Throw error on failure in loading llvm-plugin

This commit is contained in:
Divam Narula 2022-11-17 15:25:18 +09:00 committed by GitHub
parent 251831ece9
commit 693c6311f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -800,7 +800,7 @@ LLVMRustOptimize(
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);
}