[Mlir-commits] [mlir] 13237c3 - Add llvm_unreachable after fully covered switch (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Wed Sep 15 10:53:14 PDT 2021
Author: Mehdi Amini
Date: 2021-09-15T17:53:05Z
New Revision: 13237c3b1ee0e1b4688e2099b5a458c99b5d93f0
URL: https://github.com/llvm/llvm-project/commit/13237c3b1ee0e1b4688e2099b5a458c99b5d93f0
DIFF: https://github.com/llvm/llvm-project/commit/13237c3b1ee0e1b4688e2099b5a458c99b5d93f0.diff
LOG: Add llvm_unreachable after fully covered switch (NFC)
This fixes a compiler warning for some version of GCC.
Added:
Modified:
mlir/lib/Target/Cpp/TranslateToCpp.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/Cpp/TranslateToCpp.cpp b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
index aae254a14459c..859c6f015109f 100644
--- a/mlir/lib/Target/Cpp/TranslateToCpp.cpp
+++ b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
@@ -668,6 +668,7 @@ bool CppEmitter::shouldMapToUnsigned(IntegerType::SignednessSemantics val) {
case IntegerType::Unsigned:
return true;
}
+ llvm_unreachable("Unexpected IntegerType::SignednessSemantics");
}
bool CppEmitter::hasValueInScope(Value val) { return valueMapper.count(val); }
More information about the Mlir-commits
mailing list