[PATCH] D46304: [MC] Add llvm_unreachable to toString to fix compile time warning.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 1 01:19:51 PDT 2018
fhahn created this revision.
fhahn added a reviewer: sbc100.
Herald added a subscriber: aheejin.
Without this change, GCC 7 raises the warning below:
control reaches end of non-void function
https://reviews.llvm.org/D46304
Files:
lib/MC/WasmObjectWriter.cpp
Index: lib/MC/WasmObjectWriter.cpp
===================================================================
--- lib/MC/WasmObjectWriter.cpp
+++ lib/MC/WasmObjectWriter.cpp
@@ -48,6 +48,7 @@
case wasm::WASM_SYMBOL_TYPE_SECTION:
return "WASM_SYMBOL_TYPE_SECTION";
}
+ llvm_unreachable("unknown symbol type");
}
static std::string relocTypetoString(uint32_t type) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46304.144681.patch
Type: text/x-patch
Size: 374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180501/a034fe90/attachment.bin>
More information about the llvm-commits
mailing list