Skip to content

Commit

Permalink
Explicitly define LLVMPY_module_AddVerifierPass instead of using macro
Browse files Browse the repository at this point in the history
  • Loading branch information
yashssh committed Nov 7, 2024
1 parent 67430f0 commit 58acb78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ffi/PASSREGISTRY.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef MODULE_PASS
#define MODULE_PASS(NAME)
#endif
MODULE_PASS(VerifierPass)
//MODULE_PASS(VerifierPass)
MODULE_PASS(ConstantMergePass)
MODULE_PASS(DeadArgumentEliminationPass)
MODULE_PASS(CallGraphDOTPrinterPass)
Expand Down
5 changes: 5 additions & 0 deletions ffi/newpassmanagers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ LLVMPY_module_AddModuleDebugInfoPrinterPass(LLVMModulePassManagerRef MPM) {
llvm::unwrap(MPM)->addPass(ModuleDebugInfoPrinterPass(llvm::outs()));
}

API_EXPORT(void)
LLVMPY_module_AddVerifierPass(LLVMModulePassManagerRef MPM) {
llvm::unwrap(MPM)->addPass(VerifierPass());
}

#define CGSCC_PASS(NAME) \
void LLVMPY_module_Add##NAME(LLVMModulePassManagerRef MPM) { \
llvm::unwrap(MPM)->addPass( \
Expand Down

0 comments on commit 58acb78

Please sign in to comment.