[NFC] WebAssembly build break #2

Summary:
Same as r332530, move WasmSymbol::dump to an implementation file to avoid linker
issues when the dump function is seen in the header, doesn't get eliminated, and
then linking fails because of the missing dependency.

<rdar://problem/40258137>

Reviewers: sbc100, ncw, paquette, vsk, dschuff

Subscribers: jgravelle-google, aheejin, sunfish, llvm-commits

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

llvm-svn: 332542
This commit is contained in:
JF Bastien 2018-05-16 22:31:42 +00:00
parent d261e1258c
commit ddc84bf7d1
2 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,7 @@ public:
void print(raw_ostream &Out) const;
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
LLVM_DUMP_METHOD void dump() const;
#endif
};

View File

@ -48,6 +48,10 @@ void WasmSymbol::print(raw_ostream &Out) const {
}
}
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void WasmSymbol::dump() const { print(dbgs()); }
#endif
Expected<std::unique_ptr<WasmObjectFile>>
ObjectFile::createWasmObjectFile(MemoryBufferRef Buffer) {
Error Err = Error::success();