[llvm] dda1fcf - [llc][NFC] Remove unreachable return statement (#169915)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 30 00:42:33 PST 2025
Author: Tomer Shafir
Date: 2025-11-30T10:42:29+02:00
New Revision: dda1fcf7b14cdcaeb39fc7aed377d8d4483ebcac
URL: https://github.com/llvm/llvm-project/commit/dda1fcf7b14cdcaeb39fc7aed377d8d4483ebcac
DIFF: https://github.com/llvm/llvm-project/commit/dda1fcf7b14cdcaeb39fc7aed377d8d4483ebcac.diff
LOG: [llc][NFC] Remove unreachable return statement (#169915)
`reportError()` is a `[[noreturn]]` that calls `exit(1)`.
Added:
Modified:
llvm/tools/llc/llc.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index ce1ce5d68c137..ad31a0ec63387 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -355,13 +355,11 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(Triple::OSType OS) {
if (!Binary)
OpenFlags |= sys::fs::OF_TextWithCRLF;
auto FDOut = std::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags);
- if (EC) {
+ if (EC)
reportError(EC.message());
- return nullptr;
- }
-
return FDOut;
}
+
// main - Entry point for the llc compiler.
//
int main(int argc, char **argv) {
More information about the llvm-commits
mailing list