Rollup merge of #104517 - dfordivam:patch-1, r=cuviper
Throw error on failure in loading llvm-plugin
The following code silently ignores the error as the `LLVMRustSetLastError` only tracks one error at a time. At all other places where `LLVMRustSetLastError` is used the code immediately returns.
251831ece9/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp (L801-L804)
This commit is contained in:
commit
1e0df8827b
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue