From 5fc12bfe02d337e454278d83c7ae57bb44f81f67 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 20 Jun 2017 05:05:10 +0000 Subject: [PATCH] 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305771 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/WasmObjectWriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MC/WasmObjectWriter.cpp b/lib/MC/WasmObjectWriter.cpp index dd2e371c114..292c5bac1c6 100644 --- a/lib/MC/WasmObjectWriter.cpp +++ b/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. -- 2.50.1