[llvm] 042eb04 - [llvm-objdump] Add llvm_unreachable to silence GCC warning. NFC.
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 04:35:08 PDT 2020
Author: Martin Storsjö
Date: 2020-03-16T13:34:50+02:00
New Revision: 042eb0482aa758057c4f77616a4696cdb21b4fcc
URL: https://github.com/llvm/llvm-project/commit/042eb0482aa758057c4f77616a4696cdb21b4fcc
DIFF: https://github.com/llvm/llvm-project/commit/042eb0482aa758057c4f77616a4696cdb21b4fcc.diff
LOG: [llvm-objdump] Add llvm_unreachable to silence GCC warning. NFC.
GCC 7 warned about control reaching the end of the non-void function,
despite all 7 LineChar values being handled in the switch.
Added:
Modified:
llvm/tools/llvm-objdump/llvm-objdump.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 4e2c6eaac7c4..866fb5377491 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -798,6 +798,7 @@ class LiveVariablePrinter {
case LineChar::LabelHoriz:
return IsASCII ? "-" : "─";
}
+ llvm_unreachable("Unexpected LineChar");
}
/// Print live ranges to the right of an existing line. This assumes the
More information about the llvm-commits
mailing list