bool DebugPassManager = false;
PassInstrumentationCallbacks PIC;
+#if LLVM_VERSION_LT(16, 0)
StandardInstrumentations SI(DebugPassManager);
+#else
+ StandardInstrumentations SI(TheModule->getContext(), DebugPassManager);
+#endif
SI.registerCallbacks(PIC);
if (LlvmSelfProfiler){
auto Plugin = PassPlugin::Load(PluginPath.str());
if (!Plugin) {
LLVMRustSetLastError(("Failed to load pass plugin" + PluginPath.str()).c_str());
- continue;
+ return LLVMRustResult::Failure;
}
Plugin->registerPassBuilderCallbacks(PB);
}