File tree 3 files changed +6
-11
lines changed
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ extern "C" {
29
29
///
30
30
/// \returns the generated LLVM IR Module from the translated MLIR module, it is
31
31
/// owned by the caller.
32
- MLIR_CAPI_EXPORTED LLVMModuleRef mlirTranslateModuleToLLVMIR (
33
- MlirOperation module , LLVMContextRef context , MlirStringRef llvmModuleName );
32
+ MLIR_CAPI_EXPORTED LLVMModuleRef
33
+ mlirTranslateModuleToLLVMIR ( MlirOperation module , LLVMContextRef context );
34
34
35
35
#ifdef __cplusplus
36
36
}
Original file line number Diff line number Diff line change 22
22
using namespace mlir ;
23
23
24
24
LLVMModuleRef mlirTranslateModuleToLLVMIR (MlirOperation module,
25
- LLVMContextRef context,
26
- MlirStringRef llvmModuleName) {
25
+ LLVMContextRef context) {
27
26
Operation *moduleOp = unwrap (module);
28
27
29
28
llvm::LLVMContext *ctx = llvm::unwrap (context);
30
29
31
- std::unique_ptr<llvm::Module> llvmModule = mlir::translateModuleToLLVMIR (
32
- moduleOp, *ctx,
33
- llvm::StringRef (llvmModuleName.data , llvmModuleName.length ));
30
+ std::unique_ptr<llvm::Module> llvmModule =
31
+ mlir::translateModuleToLLVMIR (moduleOp, *ctx);
34
32
35
33
LLVMModuleRef moduleRef = llvm::wrap (llvmModule.release ());
36
34
Original file line number Diff line number Diff line change @@ -43,10 +43,7 @@ static void testToLLVMIR(MlirContext ctx) {
43
43
44
44
MlirOperation operation = mlirModuleGetOperation (module );
45
45
46
- MlirStringRef name = mlirStringRefCreateFromCString ("LLVMDialectModule" );
47
-
48
- LLVMModuleRef llvmModule =
49
- mlirTranslateModuleToLLVMIR (operation , llvmCtx , name );
46
+ LLVMModuleRef llvmModule = mlirTranslateModuleToLLVMIR (operation , llvmCtx );
50
47
51
48
// clang-format off
52
49
// CHECK: declare ptr @malloc(i64 %{{.*}})
You can’t perform that action at this time.
0 commit comments