From: Sam Clegg Date: Tue, 20 Jun 2017 04:47:58 +0000 (+0000) Subject: [WebAssembly] Fix build failures introduced in r305769 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad60de32330fd60ef2760c94235e9197c1f62294;p=llvm [WebAssembly] Fix build failures introduced in r305769 This fixes two build failures that only occur in certain configurations: - error: unused function 'operator<<' - error: control reaches end of non-void function Differential Revision: https://reviews.llvm.org/D34382 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305770 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp index a4faaf0f6f6..dd2e371c114 100644 --- a/lib/MC/WasmObjectWriter.cpp +++ b/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/lib/Object/WasmObjectFile.cpp b/lib/Object/WasmObjectFile.cpp index ba53f3e0076..d15860674ae 100644 --- a/lib/Object/WasmObjectFile.cpp +++ b/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 {