about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorDivam Narula <dfordivam@gmail.com>2022-11-17 15:25:18 +0900
committerGitHub <noreply@github.com>2022-11-17 15:25:18 +0900
commit693c6311f06bf49ff0fd7b972d769634e4b330b1 (patch)
treedd1f3f5cf45a16d1ce6b7470ea390167feb43faf /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent251831ece9601d64172127b6caae9087358c2386 (diff)
downloadrust-693c6311f06bf49ff0fd7b972d769634e4b330b1.tar.gz
rust-693c6311f06bf49ff0fd7b972d769634e4b330b1.zip
Throw error on failure in loading llvm-plugin
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 18d37d95a83..5f02bb6c307 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -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);
     }