Throw error on failure in loading llvm-plugin
This commit is contained in:
parent
251831ece9
commit
693c6311f0
@ -800,7 +800,7 @@ LLVMRustOptimize(
|
|||||||
auto Plugin = PassPlugin::Load(PluginPath.str());
|
auto Plugin = PassPlugin::Load(PluginPath.str());
|
||||||
if (!Plugin) {
|
if (!Plugin) {
|
||||||
LLVMRustSetLastError(("Failed to load pass plugin" + PluginPath.str()).c_str());
|
LLVMRustSetLastError(("Failed to load pass plugin" + PluginPath.str()).c_str());
|
||||||
continue;
|
return LLVMRustResult::Failure;
|
||||||
}
|
}
|
||||||
Plugin->registerPassBuilderCallbacks(PB);
|
Plugin->registerPassBuilderCallbacks(PB);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user