mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 23:29:51 +00:00
30f006473b
This is the first part of an effort to add wasm binary support across all llvm tools. Patch by Sam Clegg Differential Revision: https://reviews.llvm.org/D26172 llvm-svn: 288251
29 lines
880 B
C++
29 lines
880 B
C++
//===-- WasmDump.cpp - wasm-specific dumper ---------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// \brief This file implements the wasm-specific dumper for llvm-objdump.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm-objdump.h"
|
|
#include "llvm/Object/Wasm.h"
|
|
|
|
using namespace llvm;
|
|
using namespace object;
|
|
|
|
void llvm::printWasmFileHeader(const object::ObjectFile *Obj) {
|
|
const WasmObjectFile *File = dyn_cast<const WasmObjectFile>(Obj);
|
|
|
|
outs() << "Program Header:\n";
|
|
outs() << "Version: 0x";
|
|
outs().write_hex(File->getHeader().Version);
|
|
outs() << "\n";
|
|
}
|