mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
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
@ -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…
Reference in New Issue
Block a user