summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJF Bastien <jfb@google.com>2018-05-16 22:31:42 +0000
committerJF Bastien <jfb@google.com>2018-05-16 22:31:42 +0000
commitddc84bf7d19591470470fc883285961157bf9fef (patch)
tree916d4127bb8ccfb279020ea9d35a7f9a13a8513c
parentd261e1258c2d72911f278aa85298b4d6b5393731 (diff)
downloadbcm5719-llvm-ddc84bf7d19591470470fc883285961157bf9fef.tar.gz
bcm5719-llvm-ddc84bf7d19591470470fc883285961157bf9fef.zip
[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
-rw-r--r--llvm/include/llvm/Object/Wasm.h2
-rw-r--r--llvm/lib/Object/WasmObjectFile.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/Object/Wasm.h b/llvm/include/llvm/Object/Wasm.h
index c9e630bccb3..566a2546b30 100644
--- a/llvm/include/llvm/Object/Wasm.h
+++ b/llvm/include/llvm/Object/Wasm.h
@@ -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
};
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp
index 388e04964b2..f6e2d92c031 100644
--- a/llvm/lib/Object/WasmObjectFile.cpp
+++ b/llvm/lib/Object/WasmObjectFile.cpp
@@ -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();
OpenPOWER on IntegriCloud