]>
git.proxmox.com Git - rustc.git/blob - src/llvm/tools/llvm-objdump/llvm-objdump.h
1 //===-- llvm-objdump.h ----------------------------------------------------===//
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 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_OBJDUMP_H
11 #define LLVM_OBJDUMP_H
13 #include "llvm/ADT/StringRef.h"
14 #include "llvm/Support/CommandLine.h"
15 #include "llvm/Support/DataTypes.h"
16 #include "llvm/Support/MemoryObject.h"
20 extern cl::opt
<std::string
> TripleName
;
21 extern cl::opt
<std::string
> ArchName
;
23 // Various helper functions.
24 void DumpBytes(StringRef bytes
);
25 void DisassembleInputMachO(StringRef Filename
);
27 class StringRefMemoryObject
: public MemoryObject
{
28 virtual void anchor();
31 StringRefMemoryObject(StringRef bytes
) : Bytes(bytes
) {}
33 uint64_t getBase() const { return 0; }
34 uint64_t getExtent() const { return Bytes
.size(); }
36 int readByte(uint64_t Addr
, uint8_t *Byte
) const {
37 if (Addr
>= getExtent())