Index: llvm/trunk/include/llvm/Object/Wasm.h =================================================================== --- llvm/trunk/include/llvm/Object/Wasm.h +++ llvm/trunk/include/llvm/Object/Wasm.h @@ -88,18 +88,7 @@ return Info.Flags & wasm::WASM_SYMBOL_VISIBILITY_MASK; } - void print(raw_ostream &Out) const { - Out << "Name=" << Info.Name - << ", Kind=" << toString(wasm::WasmSymbolType(Info.Kind)) - << ", Flags=" << Info.Flags; - if (!isTypeData()) { - Out << ", ElemIndex=" << Info.ElementIndex; - } else if (isDefined()) { - Out << ", Segment=" << Info.DataRef.Segment; - Out << ", Offset=" << Info.DataRef.Offset; - Out << ", Size=" << Info.DataRef.Size; - } - } + void print(raw_ostream &Out) const; #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void dump() const { print(dbgs()); } Index: llvm/trunk/lib/Object/WasmObjectFile.cpp =================================================================== --- llvm/trunk/lib/Object/WasmObjectFile.cpp +++ llvm/trunk/lib/Object/WasmObjectFile.cpp @@ -35,6 +35,19 @@ using namespace llvm; using namespace object; +void WasmSymbol::print(raw_ostream &Out) const { + Out << "Name=" << Info.Name + << ", Kind=" << toString(wasm::WasmSymbolType(Info.Kind)) + << ", Flags=" << Info.Flags; + if (!isTypeData()) { + Out << ", ElemIndex=" << Info.ElementIndex; + } else if (isDefined()) { + Out << ", Segment=" << Info.DataRef.Segment; + Out << ", Offset=" << Info.DataRef.Offset; + Out << ", Size=" << Info.DataRef.Size; + } +} + Expected> ObjectFile::createWasmObjectFile(MemoryBufferRef Buffer) { Error Err = Error::success();