1 //===-- WasmDump.cpp - wasm-specific dumper ---------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// This file implements the wasm-specific dumper for llvm-objdump.
13 //===----------------------------------------------------------------------===//
15 #include "llvm-objdump.h"
16 #include "llvm/Object/Wasm.h"
19 using namespace object
;
21 void llvm::printWasmFileHeader(const object::ObjectFile
*Obj
) {
22 const WasmObjectFile
*File
= dyn_cast
<const WasmObjectFile
>(Obj
);
24 outs() << "Program Header:\n";
25 outs() << "Version: 0x";
26 outs().write_hex(File
->getHeader().Version
);