From fb5fad4f7cfd6b47e40d4d1d0f855b3ebeed37a3 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 1 May 2018 11:18:31 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331255 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/WasmObjectWriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp index fa26a283ce3..b3f3a34a2dd 100644 --- a/lib/MC/WasmObjectWriter.cpp +++ b/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) { -- 2.11.0