blob: 045002cd4b34a0326f96b4648952055d0752b388 [file] [log] [blame]
Derek Schuff7a578c92016-11-30 16:49:11 +00001//===-- WasmDump.cpp - wasm-specific dumper ---------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9///
10/// \file
Adrian Prantl26b584c2018-05-01 15:54:18 +000011/// This file implements the wasm-specific dumper for llvm-objdump.
Derek Schuff7a578c92016-11-30 16:49:11 +000012///
13//===----------------------------------------------------------------------===//
14
15#include "llvm-objdump.h"
16#include "llvm/Object/Wasm.h"
17
18using namespace llvm;
19using namespace object;
20
21void llvm::printWasmFileHeader(const object::ObjectFile *Obj) {
22 const WasmObjectFile *File = dyn_cast<const WasmObjectFile>(Obj);
23
24 outs() << "Program Header:\n";
25 outs() << "Version: 0x";
26 outs().write_hex(File->getHeader().Version);
27 outs() << "\n";
28}