Skip to content

Commit 1fb1327

Browse files
committed
test ff
1 parent a54a30e commit 1fb1327

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lab6/llvm-pass.so.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,15 @@ PreservedAnalyses CustomModulePass::run(Module &Module, ModuleAnalysisManager &A
6262
}
6363

6464
return PreservedAnalyses::none();
65+
}
66+
}
67+
extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
68+
llvmGetPassPluginInfo() {
69+
return {LLVM_PLUGIN_API_VERSION, "LLVMPass", "1.0",
70+
[](PassBuilder &PB) {
71+
PB.registerOptimizerLastEPCallback(
72+
[](ModulePassManager &MPM, OptimizationLevel OL) {
73+
MPM.addPass(LLVMPass());
74+
});
75+
}};
6576
}

0 commit comments

Comments
 (0)