diff options
author | Jacob Lambert <jacob.lambert@amd.com> | 2024-02-14 11:25:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 11:25:58 -0800 |
commit | 7d28f19f68c82b65cf1180b170f33d6f82422d64 (patch) | |
tree | 313fc57e2474f6efd82dbccf778447061a0bbc3a | |
parent | c9e8e91acae73c84a30311c6c745361251cf5146 (diff) |
[clang][CodeGen] Add missing error check (#81777)
Add missing error check. This resolves "error: variable 'Err' set but
not used" warnings
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index ab08a875e7e9..bb9aaba025fa 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -291,6 +291,9 @@ bool BackendConsumer::LinkInModules(llvm::Module *M, bool ShouldLinkFiles) { }); } else Err = Linker::linkModules(*M, std::move(LM.Module), LM.LinkFlags); + + if (Err) + return true; } LinkModules.clear(); |