[llvm] r305771 - Fix unused function build error in lld
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 22:05:10 PDT 2017
Author: sbc
Date: Tue Jun 20 00:05:10 2017
New Revision: 305771
URL: http://llvm.org/viewvc/llvm-project?rev=305771&view=rev
Log:
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
Modified:
llvm/trunk/lib/MC/WasmObjectWriter.cpp
Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=305771&r1=305770&r2=305771&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Tue Jun 20 00:05:10 2017
@@ -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.
More information about the llvm-commits
mailing list