diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index a4faaf0f6f6c..dd2e371c1140 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -162,8 +162,7 @@ struct WasmRelocationEntry { #endif }; -inline raw_ostream &operator<<(raw_ostream &OS, - const WasmRelocationEntry &Rel) { +raw_ostream &operator<<(raw_ostream &OS, const WasmRelocationEntry &Rel) { Rel.print(OS); return OS; } diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index ba53f3e00760..d15860674aeb 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -753,6 +753,7 @@ uint64_t WasmObjectFile::getSymbolValueImpl(DataRefImpl Symb) const { case WasmSymbol::SymbolType::DEBUG_FUNCTION_NAME: return Sym.ElementIndex; } + llvm_unreachable("invalid symbol type"); } uint32_t WasmObjectFile::getSymbolAlignment(DataRefImpl Symb) const {