]> granicus.if.org Git - llvm/commitdiff
Fix unused function build error in lld
authorSam Clegg <sbc@chromium.org>
Tue, 20 Jun 2017 05:05:10 +0000 (05:05 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 20 Jun 2017 05:05:10 +0000 (05:05 +0000)
The lld-x86_64-darwin13 is failing with:
 error: unused function 'operator<<'

Wrap the declation in ifndef NDEBUG, which matches
what is done in MipsELFObjectWriter.cpp.

Differential Revision: https://reviews.llvm.org/D34384

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305771 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/WasmObjectWriter.cpp

index dd2e371c114059f2763ce44b5229ea5a8a056dd0..292c5bac1c607d0663951e2494cbb4116009f6d5 100644 (file)
@@ -162,10 +162,12 @@ struct WasmRelocationEntry {
 #endif
 };
 
+#if !defined(NDEBUG)
 raw_ostream &operator<<(raw_ostream &OS, const WasmRelocationEntry &Rel) {
   Rel.print(OS);
   return OS;
 }
+#endif
 
 class WasmObjectWriter : public MCObjectWriter {
   /// Helper struct for containing some precomputed information on symbols.