Skip to content

Commit 7d28f19

Browse files
authored
[clang][CodeGen] Add missing error check (#81777)
Add missing error check. This resolves "error: variable 'Err' set but not used" warnings
1 parent c9e8e91 commit 7d28f19

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/CodeGen/CodeGenAction.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ bool BackendConsumer::LinkInModules(llvm::Module *M, bool ShouldLinkFiles) {
291291
});
292292
} else
293293
Err = Linker::linkModules(*M, std::move(LM.Module), LM.LinkFlags);
294+
295+
if (Err)
296+
return true;
294297
}
295298

296299
LinkModules.clear();

0 commit comments

Comments
 (0)