summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-05-01 11:18:31 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-05-01 11:18:31 +0000
commitba4d85ee3fdcd25d5d82380be5e3cb16640b31ce (patch)
tree22fae86e65850173ee5fe0bdecaec6bb41a71b16
parentfc0c26f1a68ae03096cdb820a6524d8703d2fd6c (diff)
downloadbcm5719-llvm-ba4d85ee3fdcd25d5d82380be5e3cb16640b31ce.tar.gz
bcm5719-llvm-ba4d85ee3fdcd25d5d82380be5e3cb16640b31ce.zip
[MC] Add llvm_unreachable to toString to fix compile time warning.
Without this change, GCC 7 raises the warning below: control reaches end of non-void function Reviewers: sbc100, andreadb Reviewed By: andreadb Differential Revision: https://reviews.llvm.org/D46304 llvm-svn: 331255
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index fa26a283ce3..b3f3a34a2dd 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -47,9 +47,8 @@ static std::string toString(wasm::WasmSymbolType type) {
return "WASM_SYMBOL_TYPE_DATA";
case wasm::WASM_SYMBOL_TYPE_SECTION:
return "WASM_SYMBOL_TYPE_SECTION";
- default:
- llvm_unreachable("unexpected kind");
}
+ llvm_unreachable("unknown symbol type");
}
static std::string relocTypetoString(uint32_t type) {
OpenPOWER on IntegriCloud