Skip to content

Commit

Permalink
[MC] Add llvm_unreachable to toString to fix compile time warning.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fhahn committed May 1, 2018
1 parent fc0c26f commit ba4d85e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/MC/WasmObjectWriter.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit ba4d85e

Please sign in to comment.