]> granicus.if.org Git - llvm/commitdiff
[WebAssembly] Fix build failures introduced in r305769
authorSam Clegg <sbc@chromium.org>
Tue, 20 Jun 2017 04:47:58 +0000 (04:47 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 20 Jun 2017 04:47:58 +0000 (04:47 +0000)
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

lib/MC/WasmObjectWriter.cpp
lib/Object/WasmObjectFile.cpp

index a4faaf0f6f6c587b1d76f457dda314c3935da256..dd2e371c114059f2763ce44b5229ea5a8a056dd0 100644 (file)
@@ -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;
 }
index ba53f3e00760274d88e56d5d39ec273ce53a870c..d15860674aeb9ed0febd29619fffd08194240131 100644 (file)
@@ -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 {