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
This commit is contained in:
Sam Clegg 2017-06-20 05:05:10 +00:00
parent 7f055dee27
commit 1fb8daa69a
1 changed files with 2 additions and 0 deletions

View 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.