[llvm-objcopy] [COFF] Fix warnings abuilt missing field initialization. NFC.
[llvm-complete.git] / tools / llvm-objdump / llvm-objdump.h
blob44ef14d7f698a165d6ff5d400057f2279cf5df57
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
10 #define LLVM_TOOLS_LLVM_OBJDUMP_LLVM_OBJDUMP_H
12 #include "llvm/DebugInfo/DIContext.h"
13 #include "llvm/Support/CommandLine.h"
14 #include "llvm/Support/Compiler.h"
15 #include "llvm/Support/DataTypes.h"
16 #include "llvm/Object/Archive.h"
18 namespace llvm {
19 class StringRef;
21 namespace object {
22 class COFFObjectFile;
23 class COFFImportFile;
24 class MachOObjectFile;
25 class MachOUniversalBinary;
26 class ObjectFile;
27 class Archive;
28 class RelocationRef;
31 extern cl::opt<std::string> TripleName;
32 extern cl::opt<std::string> ArchName;
33 extern cl::opt<std::string> MCPU;
34 extern cl::list<std::string> MAttrs;
35 extern cl::list<std::string> FilterSections;
36 extern cl::opt<bool> AllHeaders;
37 extern cl::opt<bool> Demangle;
38 extern cl::opt<bool> Disassemble;
39 extern cl::opt<bool> DisassembleAll;
40 extern cl::opt<bool> NoShowRawInsn;
41 extern cl::opt<bool> NoLeadingAddr;
42 extern cl::opt<bool> PrivateHeaders;
43 extern cl::opt<bool> FileHeaders;
44 extern cl::opt<bool> FirstPrivateHeader;
45 extern cl::opt<bool> ExportsTrie;
46 extern cl::opt<bool> Rebase;
47 extern cl::opt<bool> Bind;
48 extern cl::opt<bool> LazyBind;
49 extern cl::opt<bool> WeakBind;
50 extern cl::opt<bool> RawClangAST;
51 extern cl::opt<bool> UniversalHeaders;
52 extern cl::opt<bool> ArchiveHeaders;
53 extern cl::opt<bool> IndirectSymbols;
54 extern cl::opt<bool> DataInCode;
55 extern cl::opt<bool> LinkOptHints;
56 extern cl::opt<bool> InfoPlist;
57 extern cl::opt<bool> DylibsUsed;
58 extern cl::opt<bool> DylibId;
59 extern cl::opt<bool> ObjcMetaData;
60 extern cl::opt<std::string> DisSymName;
61 extern cl::opt<bool> NonVerbose;
62 extern cl::opt<bool> Relocations;
63 extern cl::opt<bool> DynamicRelocations;
64 extern cl::opt<bool> SectionHeaders;
65 extern cl::opt<bool> SectionContents;
66 extern cl::opt<bool> SymbolTable;
67 extern cl::opt<bool> UnwindInfo;
68 extern cl::opt<bool> PrintImmHex;
69 extern cl::opt<DIDumpType> DwarfDumpType;
71 // Various helper functions.
72 void error(std::error_code ec);
73 bool RelocAddressLess(object::RelocationRef a, object::RelocationRef b);
74 void ParseInputMachO(StringRef Filename);
75 void ParseInputMachO(object::MachOUniversalBinary *UB);
76 void printCOFFUnwindInfo(const object::COFFObjectFile* o);
77 void printMachOUnwindInfo(const object::MachOObjectFile* o);
78 void printMachOExportsTrie(const object::MachOObjectFile* o);
79 void printMachORebaseTable(object::MachOObjectFile* o);
80 void printMachOBindTable(object::MachOObjectFile* o);
81 void printMachOLazyBindTable(object::MachOObjectFile* o);
82 void printMachOWeakBindTable(object::MachOObjectFile* o);
83 void printELFFileHeader(const object::ObjectFile *o);
84 void printELFDynamicSection(const object::ObjectFile *Obj);
85 void printCOFFFileHeader(const object::ObjectFile *o);
86 void printCOFFSymbolTable(const object::COFFImportFile *i);
87 void printCOFFSymbolTable(const object::COFFObjectFile *o);
88 void printMachOFileHeader(const object::ObjectFile *o);
89 void printMachOLoadCommands(const object::ObjectFile *o);
90 void printWasmFileHeader(const object::ObjectFile *o);
91 void printExportsTrie(const object::ObjectFile *o);
92 void printRebaseTable(object::ObjectFile *o);
93 void printBindTable(object::ObjectFile *o);
94 void printLazyBindTable(object::ObjectFile *o);
95 void printWeakBindTable(object::ObjectFile *o);
96 void printRawClangAST(const object::ObjectFile *o);
97 void PrintRelocations(const object::ObjectFile *o);
98 void PrintDynamicRelocations(const object::ObjectFile *o);
99 void PrintSectionHeaders(const object::ObjectFile *o);
100 void PrintSectionContents(const object::ObjectFile *o);
101 void PrintSymbolTable(const object::ObjectFile *o, StringRef ArchiveName,
102 StringRef ArchitectureName = StringRef());
103 void warn(StringRef Message);
104 LLVM_ATTRIBUTE_NORETURN void error(Twine Message);
105 LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, Twine Message);
106 LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, std::error_code EC);
107 LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, llvm::Error E);
108 LLVM_ATTRIBUTE_NORETURN void report_error(StringRef FileName,
109 StringRef ArchiveName,
110 llvm::Error E,
111 StringRef ArchitectureName
112 = StringRef());
113 LLVM_ATTRIBUTE_NORETURN void report_error(StringRef ArchiveName,
114 const object::Archive::Child &C,
115 llvm::Error E,
116 StringRef ArchitectureName
117 = StringRef());
119 } // end namespace llvm
121 #endif