diff options
author | Sam Clegg <sbc@chromium.org> | 2017-06-20 05:05:10 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2017-06-20 05:05:10 +0000 |
commit | 1fb8daa69a62fb8151e16e422706159f4be93cc9 (patch) | |
tree | 816f011a3f2af2efed7e7891fdef4bea49ab62b8 | |
parent | 7f055dee27e5144dab71dd04e673ca048ae3c7b2 (diff) | |
download | llvm-1fb8daa69a62fb8151e16e422706159f4be93cc9.zip llvm-1fb8daa69a62fb8151e16e422706159f4be93cc9.tar.gz llvm-1fb8daa69a62fb8151e16e422706159f4be93cc9.tar.bz2 |
Fix unused function build error in lld
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
llvm-svn: 305771
-rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index dd2e371..292c5ba 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -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. |