[clang] 7d28f19 - [clang][CodeGen] Add missing error check (#81777)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 14 11:26:03 PST 2024
Author: Jacob Lambert
Date: 2024-02-14T11:25:58-08:00
New Revision: 7d28f19f68c82b65cf1180b170f33d6f82422d64
URL: https://github.com/llvm/llvm-project/commit/7d28f19f68c82b65cf1180b170f33d6f82422d64
DIFF: https://github.com/llvm/llvm-project/commit/7d28f19f68c82b65cf1180b170f33d6f82422d64.diff
LOG: [clang][CodeGen] Add missing error check (#81777)
Add missing error check. This resolves "error: variable 'Err' set but
not used" warnings
Added:
Modified:
clang/lib/CodeGen/CodeGenAction.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index ab08a875e7e9c1..bb9aaba025fa59 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();
More information about the cfe-commits
mailing list