| 151 | } |
| 152 | |
| 153 | void doSimpleTest(mlir::MLIRContext *ctx, const std::string &typeName, |
| 154 | std::vector<void *> args, |
| 155 | const std::string &additionalCode = "") { |
| 156 | std::string code = additionalCode + R"#( |
| 157 | func.func private @callee(%0: )#" + |
| 158 | typeName + R"#() |
| 159 | func.func @__nvqpp__mlirgen__testy(%0: )#" + |
| 160 | typeName + R"#() { |
| 161 | call @callee(%0) : ()#" + |
| 162 | typeName + R"#() -> () |
| 163 | return |
| 164 | })#"; |
| 165 | |
| 166 | // Create the Module |
| 167 | auto mod = mlir::parseSourceString<mlir::ModuleOp>(code, ctx); |
| 168 | llvm::outs() << "Source module:\n" << *mod << '\n'; |
| 169 | ArgumentConverter ab{"testy", *mod}; |
| 170 | // Create the argument conversions |
| 171 | ab.gen(args); |
| 172 | // Dump all conversions |
| 173 | dumpSubstitutionModules(ab); |
| 174 | } |
| 175 | |
| 176 | void doTest(mlir::MLIRContext *ctx, std::vector<std::string> &typeNames, |
| 177 | std::vector<void *> args, std::size_t startingArgIdx = 0) { |
no test coverage detected