llvm.org GIT mirror llvm / 0c7c98a
[llvm-pdbdump] Many minor fixes and improvements A short list of some of the improvements: 1) Now supports -all command line argument, which implies many other command line arguments to simplify usage. 2) Now supports -no-compiler-generated command line argument to exclude compiler generated types. 3) Prints base class list. 4) -class-definitions implies -types. 5) Proper display of bitfields. 6) Can now distinguish between struct/class/interface/union. And a few other minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230933 91177308-0d34-0410-b5e6-96231b3b80d8 Zachary Turner 4 years ago
18 changed file(s) with 305 addition(s) and 71 deletion(s). Raw diff Collapse all Expand all
2525 raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
2626 raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
2727 raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
28 raw_ostream &operator<<(raw_ostream &OS, const PDB_MemberAccess &Access);
29 raw_ostream &operator<<(raw_ostream &OS, const PDB_UdtType &Type);
2830 raw_ostream &operator<<(raw_ostream &OS, const PDB_UniqueId &Id);
2931
3032 raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);
469469 uint16_t UInt16;
470470 uint32_t UInt32;
471471 uint64_t UInt64;
472 void* Pointer;
473472 };
473 #define VARIANT_EQUAL_CASE(Enum) \
474 case PDB_VariantType::Enum: \
475 return Enum == Other.Enum;
476 bool operator==(const Variant &Other) const {
477 if (Type != Other.Type)
478 return false;
479 switch (Type) {
480 VARIANT_EQUAL_CASE(Bool)
481 VARIANT_EQUAL_CASE(Int8)
482 VARIANT_EQUAL_CASE(Int16)
483 VARIANT_EQUAL_CASE(Int32)
484 VARIANT_EQUAL_CASE(Int64)
485 VARIANT_EQUAL_CASE(Single)
486 VARIANT_EQUAL_CASE(Double)
487 VARIANT_EQUAL_CASE(UInt8)
488 VARIANT_EQUAL_CASE(UInt16)
489 VARIANT_EQUAL_CASE(UInt32)
490 VARIANT_EQUAL_CASE(UInt64)
491 default:
492 return true;
493 }
494 }
495 #undef VARIANT_EQUAL_CASE
496 bool operator!=(const Variant &Other) const { return !(*this == Other); }
474497 };
475498
476499 } // namespace llvm
246246 return OS;
247247 }
248248
249 raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_MemberAccess &Access) {
250 switch (Access) {
251 CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Public, "public", OS)
252 CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Protected, "protected", OS)
253 CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Private, "private", OS)
254 }
255 return OS;
256 }
257
258 raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UdtType &Type) {
259 switch (Type) {
260 CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Class, "class", OS)
261 CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Struct, "struct", OS)
262 CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Interface, "interface", OS)
263 CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Union, "union", OS)
264 }
265 return OS;
266 }
267
249268 raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UniqueId &Id) {
250269 static const char *Lookup = "0123456789ABCDEF";
251270
303322 default:
304323 OS << Value.Type;
305324 }
306 OS << " {" << Value.Type << "}";
307325 return OS;
308326 }
309327
2929
3030 ; FULL_CLASS: ---TYPES---
3131 ; FULL_CLASS: Classes
32 ; FULL_CLASS-DAG: class A {
32 ; FULL_CLASS-DAG: struct A {
3333 ; FULL_CLASS: public:
3434 ; FULL_CLASS: virtual void PureFunc() = 0
3535 ; FULL_CLASS: virtual void VirtualFunc()
3636 ; FULL_CLASS: void RegularFunc()
3737 ; FULL_CLASS: }
38 ; FULL_CLASS-DAG: class MemberTest {
38 ; FULL_CLASS-DAG: struct MemberTest {
3939 ; FULL_CLASS: data +0x00 MemberTest::NestedEnum m_nested_enum
4040 ; FULL_CLASS: data +0x04 int m_typedef
4141 ; FULL_CLASS: data +0x08 bool m_bool
0 // Compile with "cl /c /Zi /GR- ClassLayoutTest.cpp"
1 // Link with "link ClassLayoutTest.obj /debug /nodefaultlib /entry:main"
2
3 namespace MembersTest {
4 class A {
5 public:
6 typedef int NestedTypedef;
7 enum NestedEnum {
8 NestedEnumValue1
9 };
10
11 void MemberFunc() {}
12
13 private:
14 int IntMemberVar;
15 double DoubleMemberVar;
16 };
17 }
18
19 namespace GlobalsTest {
20 int IntVar;
21 double DoubleVar;
22
23 typedef int Typedef;
24 enum Enum {
25 Val1
26 } EnumVar;
27 Typedef TypedefVar;
28 }
29
30 namespace BaseClassTest {
31 class A {};
32 class B : public virtual A {};
33 class C : public virtual A {};
34 class D : protected B, private C {};
35 }
36
37 namespace UdtKindTest {
38 struct A {};
39 class B {};
40 union C {};
41 }
42
43 namespace BitFieldTest {
44 struct A {
45 int Bits1 : 1;
46 int Bits2 : 2;
47 int Bits3 : 3;
48 int Bits4 : 4;
49 int Bits22 : 22;
50 int Offset0x04;
51 };
52 };
53
54 int main(int argc, char **argv) {
55 MembersTest::A v1;
56 v1.MemberFunc();
57 BaseClassTest::D v2;
58 UdtKindTest::A v3;
59 UdtKindTest::B v4;
60 UdtKindTest::C v5;
61 BitFieldTest::A v7;
62 return 0;
63 }
0 ; RUN: llvm-pdbdump -all %p/Inputs/ClassLayoutTest.pdb > %t
1 ; RUN: FileCheck -input-file=%t %s -check-prefix=GLOBALS_TEST
2 ; RUN: FileCheck -input-file=%t %s -check-prefix=MEMBERS_TEST
3 ; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_A
4 ; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_B
5 ; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_C
6 ; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_D
7 ; RUN: FileCheck -input-file=%t %s -check-prefix=UDT_KIND_TEST
8 ; RUN: FileCheck -input-file=%t %s -check-prefix=BITFIELD_TEST
9
10 ; GLOBALS_TEST: ---GLOBALS---
11 ; GLOBALS_TEST-DAG: int GlobalsTest::IntVar
12 ; GLOBALS_TEST-DAG: double GlobalsTest::DoubleVar
13 ; GLOBALS_TEST-DAG: GlobalsTest::Enum GlobalsTest::EnumVar
14
15 ; MEMBERS_TEST: ---TYPES---
16 ; MEMBERS_TEST: class MembersTest::A {
17 ; MEMBERS_TEST-DAG: typedef int NestedTypedef
18 ; MEMBERS_TEST-DAG: enum NestedEnum
19 ; MEMBERS_TEST: public:
20 ; MEMBERS_TEST-NEXT: void MemberFunc()
21 ; MEMBERS_TEST-NEXT: private:
22 ; MEMBERS_TEST-DAG: int IntMemberVar
23 ; MEMBERS_TEST-DAG: double DoubleMemberVar
24 ; MEMBERS_TEST: }
25
26 ; BASE_CLASS_A: ---TYPES---
27 ; BASE_CLASS_A: class BaseClassTest::A {}
28
29 ; BASE_CLASS_B: ---TYPES---
30 ; BASE_CLASS_B: class BaseClassTest::B
31 ; BASE_CLASS_B-NEXT: : public virtual BaseClassTest::A {
32
33 ; BASE_CLASS_C: ---TYPES---
34 ; BASE_CLASS_C: class BaseClassTest::C
35 ; BASE_CLASS_C-NEXT: : public virtual BaseClassTest::A {
36
37 ; BASE_CLASS_D: ---TYPES---
38 ; BASE_CLASS_D: class BaseClassTest::D
39 ; BASE_CLASS_D-DAG: protected BaseClassTest::B
40 ; BASE_CLASS_D-DAG: private BaseClassTest::C
41 ; BASE_CLASS_D-DAG: protected virtual BaseClassTest::A
42
43 ; UDT_KIND_TEST: ---TYPES---
44 ; UDT_KIND_TEST-DAG: union UdtKindTest::C {}
45 ; UDT_KIND_TEST-DAG: class UdtKindTest::B {}
46 ; UDT_KIND_TEST-DAG: struct UdtKindTest::A {}
47
48 ; BITFIELD_TEST: ---TYPES---
49 ; BITFIELD_TEST: struct BitFieldTest::A {
50 ; BITFIELD_TEST-NEXT: public:
51 ; BITFIELD_TEST-NEXT: +0x00 int Bits1 : 1
52 ; BITFIELD_TEST-NEXT: +0x00 int Bits2 : 2
53 ; BITFIELD_TEST-NEXT: +0x00 int Bits3 : 3
54 ; BITFIELD_TEST-NEXT: +0x00 int Bits4 : 4
55 ; BITFIELD_TEST-NEXT: +0x00 int Bits22 : 22
56 ; BITFIELD_TEST-NEXT: +0x04 int Offset0x04
1717 ; NO_FILTER: Typedefs
1818 ; NO_FILTER: typedef int GlobalTypedef
1919 ; NO_FILTER: Classes:
20 ; NO_FILTER: class __vc_attributes
20 ; NO_FILTER: struct __vc_attributes
2121 ; NO_FILTER: class FilterTestClass
2222 ; NO_FILTER-DAG: typedef int NestedTypedef
2323 ; NO_FILTER-DAG: enum NestedEnum
8080 WithColor(Printer, PDB_ColorItem::Type).get() << "HRESULT";
8181 break;
8282 default:
83 WithColor(Printer, PDB_ColorItem::Type).get() << "(unknown)";
83 WithColor(Printer, PDB_ColorItem::Type).get() << "void";
8484 break;
8585 }
8686 }
3232
3333 void ClassDefinitionDumper::start(const PDBSymbolTypeUDT &Class) {
3434 std::string Name = Class.getName();
35 WithColor(Printer, PDB_ColorItem::Keyword).get() << "class ";
35 WithColor(Printer, PDB_ColorItem::Keyword).get() << Class.getUdtKind() << " ";
3636 WithColor(Printer, PDB_ColorItem::Type).get() << Class.getName();
37
38 auto Bases = Class.findAllChildren();
39 if (Bases->getChildCount() > 0) {
40 Printer.Indent();
41 Printer.NewLine();
42 Printer << ":";
43 uint32_t BaseIndex = 0;
44 while (auto Base = Bases->getNext()) {
45 Printer << " ";
46 WithColor(Printer, PDB_ColorItem::Keyword).get() << Base->getAccess();
47 if (Base->isVirtualBaseClass())
48 WithColor(Printer, PDB_ColorItem::Keyword).get() << " virtual";
49 WithColor(Printer, PDB_ColorItem::Type).get() << " " << Base->getName();
50 if (++BaseIndex < Bases->getChildCount()) {
51 Printer.NewLine();
52 Printer << ",";
53 }
54 }
55 Printer.Unindent();
56 }
57
3758 Printer << " {";
3859 auto Children = Class.findAllChildren();
3960 if (Children->getChildCount() == 0) {
6182 auto &AccessGroup = Groups.find((int)Access)->second;
6283
6384 if (auto Func = dyn_cast(Child.get())) {
64 if (Func->isCompilerGenerated())
85 if (Func->isCompilerGenerated() && opts::ExcludeCompilerGenerated)
6586 continue;
66 if (Func->getLength() == 0 && !Func->isPureVirtual())
87 if (Func->getLength() == 0 && !Func->isPureVirtual() &&
88 !Func->isIntroVirtualFunction())
6789 continue;
6890 Child.release();
6991 AccessGroup.Functions.push_back(std::unique_ptr(Func));
123123 << "[" << format_hex(RVA, 10) << " - "
124124 << format_hex(RVA + Symbol.getLength(), 10) << "]";
125125 }
126 Printer << " (" << Ordinal << ") ";
126 Printer << " (";
127 WithColor(Printer, PDB_ColorItem::Register).get() << Ordinal;
128 Printer << ") ";
127129 std::string Name = Symbol.getName();
128130 if (!Name.empty())
129131 WithColor(Printer, PDB_ColorItem::Identifier).get() << Name;
111111 uint32_t FuncStart = Symbol.getRelativeVirtualAddress();
112112 uint32_t FuncEnd = FuncStart + Symbol.getLength();
113113
114 Printer << "func ";
115 WithColor(Printer, PDB_ColorItem::Address).get() << "["
116 << format_hex(FuncStart, 8);
114 Printer << "func [";
115 WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(FuncStart, 10);
117116 if (auto DebugStart = Symbol.findOneChild()) {
118117 uint32_t Prologue = DebugStart->getRelativeVirtualAddress() - FuncStart;
119118 WithColor(Printer, PDB_ColorItem::Offset).get() << "+" << Prologue;
120119 }
121 WithColor(Printer, PDB_ColorItem::Address).get() << " - "
122 << format_hex(FuncEnd, 8);
120 Printer << " - ";
121 WithColor(Printer, PDB_ColorItem::Address).get() << format_hex(FuncEnd, 10);
123122 if (auto DebugEnd = Symbol.findOneChild()) {
124123 uint32_t Epilogue = FuncEnd - DebugEnd->getRelativeVirtualAddress();
125124 WithColor(Printer, PDB_ColorItem::Offset).get() << "-" << Epilogue;
126125 }
127 WithColor(Printer, PDB_ColorItem::Address).get() << "] ";
128
129 if (Symbol.hasFramePointer())
130 WithColor(Printer, PDB_ColorItem::Address).get()
131 << "(" << Symbol.getLocalBasePointerRegisterId() << ")";
132 else
133 WithColor(Printer, PDB_ColorItem::Address).get() << "(FPO)";
134
135 Printer << " ";
126 Printer << "] (";
127
128 if (Symbol.hasFramePointer()) {
129 WithColor(Printer, PDB_ColorItem::Register).get()
130 << Symbol.getLocalBasePointerRegisterId();
131 } else {
132 WithColor(Printer, PDB_ColorItem::Register).get() << "FPO";
133 }
134 Printer << ") ";
135
136136 if (Symbol.isVirtual() || Symbol.isPureVirtual())
137137 WithColor(Printer, PDB_ColorItem::Keyword).get() << "virtual ";
138138
88
99 #include "LinePrinter.h"
1010
11 #include "llvm-pdbdump.h"
12
1113 #include "llvm/Support/Regex.h"
1214
1315 #include
1517 using namespace llvm;
1618
1719 LinePrinter::LinePrinter(int Indent, llvm::raw_ostream &Stream)
18 : OS(Stream), IndentSpaces(Indent), CurrentIndent(0) {}
20 : OS(Stream), IndentSpaces(Indent), CurrentIndent(0) {
21 SetFilters(TypeFilters, opts::ExcludeTypes.begin(), opts::ExcludeTypes.end());
22 SetFilters(SymbolFilters, opts::ExcludeSymbols.begin(),
23 opts::ExcludeSymbols.end());
24 SetFilters(CompilandFilters, opts::ExcludeCompilands.begin(),
25 opts::ExcludeCompilands.end());
26 }
1927
2028 void LinePrinter::Indent() { CurrentIndent += IndentSpaces; }
2129
8593 Color = raw_ostream::MAGENTA;
8694 Bold = true;
8795 return;
96 case PDB_ColorItem::Register:
8897 case PDB_ColorItem::Offset:
8998 Color = raw_ostream::YELLOW;
9099 Bold = false;
2424 public:
2525 LinePrinter(int Indent, raw_ostream &Stream);
2626
27 template void SetTypeFilters(Iter Begin, Iter End) {
28 TypeFilters.clear();
29 for (; Begin != End; ++Begin)
30 TypeFilters.push_back(StringRef(*Begin));
31 }
32 template void SetSymbolFilters(Iter Begin, Iter End) {
33 SymbolFilters.clear();
34 for (; Begin != End; ++Begin)
35 SymbolFilters.push_back(StringRef(*Begin));
36 }
37 template void SetCompilandFilters(Iter Begin, Iter End) {
38 CompilandFilters.clear();
39 for (; Begin != End; ++Begin)
40 CompilandFilters.push_back(StringRef(*Begin));
41 }
42
4327 void Indent();
4428 void Unindent();
4529 void NewLine();
4630
4731 raw_ostream &getStream() { return OS; }
32 int getIndentLevel() const { return CurrentIndent; }
4833
4934 bool IsTypeExcluded(llvm::StringRef TypeName);
5035 bool IsSymbolExcluded(llvm::StringRef SymbolName);
5136 bool IsCompilandExcluded(llvm::StringRef CompilandName);
5237
5338 private:
39 template
40 void SetFilters(std::list &List, Iter Begin, Iter End) {
41 List.clear();
42 for (; Begin != End; ++Begin)
43 List.push_back(StringRef(*Begin));
44 }
45
5446 raw_ostream &OS;
5547 int IndentSpaces;
5648 int CurrentIndent;
7668 Path,
7769 SectionHeader,
7870 LiteralValue,
71 Register,
7972 };
8073
8174 class WithColor {
3030 uint32_t TargetId = Symbol.getTypeId();
3131 if (auto TypeSymbol = Symbol.getSession().getSymbolById(TargetId))
3232 TypeSymbol->dump(*this);
33 WithColor(Printer, PDB_ColorItem::Type).get() << " " << Symbol.getName();
33 WithColor(Printer, PDB_ColorItem::Identifier).get() << " "
34 << Symbol.getName();
3435 }
3536
3637 void TypedefDumper::dump(const PDBSymbolTypeArray &Symbol) {}
7374
7475 void TypedefDumper::dump(const PDBSymbolTypeUDT &Symbol) {
7576 WithColor(Printer, PDB_ColorItem::Keyword).get() << "class ";
76 WithColor(Printer, PDB_ColorItem::Type).get() << " " << Symbol.getName();
77 WithColor(Printer, PDB_ColorItem::Type).get() << Symbol.getName();
7778 }
3030 : PDBSymDumper(true), Printer(P) {}
3131
3232 void VariableDumper::start(const PDBSymbolData &Var) {
33 if (Var.isCompilerGenerated() && opts::ExcludeCompilerGenerated)
34 return;
3335 if (Printer.IsSymbolExcluded(Var.getName()))
3436 return;
3537
4042
4143 switch (auto LocType = Var.getLocationType()) {
4244 case PDB_LocType::Static:
45 Printer << "[";
4346 WithColor(Printer, PDB_ColorItem::Address).get()
44 << "[" << format_hex(Var.getRelativeVirtualAddress(), 10) << "] ";
47 << format_hex(Var.getRelativeVirtualAddress(), 10);
48 Printer << "] ";
4549 WithColor(Printer, PDB_ColorItem::Keyword).get() << "static ";
4650 dumpSymbolTypeAndName(*VarType, Var.getName());
4751 break;
4852 case PDB_LocType::Constant:
4953 WithColor(Printer, PDB_ColorItem::Keyword).get() << "const ";
5054 dumpSymbolTypeAndName(*VarType, Var.getName());
51 Printer << "[";
55 Printer << " = ";
5256 WithColor(Printer, PDB_ColorItem::LiteralValue).get() << Var.getValue();
53 Printer << "]";
5457 break;
5558 case PDB_LocType::ThisRel:
5659 WithColor(Printer, PDB_ColorItem::Offset).get()
5760 << "+" << format_hex(Var.getOffset(), 4) << " ";
5861 dumpSymbolTypeAndName(*VarType, Var.getName());
62 break;
63 case PDB_LocType::BitField:
64 WithColor(Printer, PDB_ColorItem::Offset).get()
65 << "+" << format_hex(Var.getOffset(), 4) << " ";
66 dumpSymbolTypeAndName(*VarType, Var.getName());
67 Printer << " : ";
68 WithColor(Printer, PDB_ColorItem::LiteralValue).get() << Var.getLength();
5969 break;
6070 default:
6171 Printer << "unknown(" << LocType << ") ";
5555 cl::desc(""),
5656 cl::OneOrMore);
5757
58 cl::opt Compilands("compilands", cl::desc("Display compilands"));
59 cl::opt Symbols("symbols",
60 cl::desc("Display symbols for each compiland"));
61 cl::opt Globals("globals", cl::desc("Dump global symbols"));
62 cl::opt Types("types", cl::desc("Display types"));
63 cl::opt ClassDefs("class-definitions",
64 cl::desc("Display full class definitions"));
58 cl::OptionCategory TypeCategory("Symbol Type Options");
59 cl::OptionCategory FilterCategory("Filtering Options");
60
61 cl::opt Compilands("compilands", cl::desc("Display compilands"),
62 cl::cat(TypeCategory));
63 cl::opt Symbols("symbols", cl::desc("Display symbols for each compiland"),
64 cl::cat(TypeCategory));
65 cl::opt Globals("globals", cl::desc("Dump global symbols"),
66 cl::cat(TypeCategory));
67 cl::opt Types("types", cl::desc("Display types"), cl::cat(TypeCategory));
68 cl::opt
69 ClassDefs("class-definitions",
70 cl::desc("Display full class definitions (implies -types)"),
71 cl::cat(TypeCategory));
72 cl::opt
73 All("all", cl::desc("Implies all other options in 'Symbol Types' category"),
74 cl::cat(TypeCategory));
6575
6676 cl::list
6777 ExcludeTypes("exclude-types",
6878 cl::desc("Exclude types by regular expression"),
69 cl::ZeroOrMore);
79 cl::ZeroOrMore, cl::cat(FilterCategory));
7080 cl::list
7181 ExcludeSymbols("exclude-symbols",
7282 cl::desc("Exclude symbols by regular expression"),
73 cl::ZeroOrMore);
83 cl::ZeroOrMore, cl::cat(FilterCategory));
7484 cl::list
7585 ExcludeCompilands("exclude-compilands",
7686 cl::desc("Exclude compilands by regular expression"),
77 cl::ZeroOrMore);
87 cl::ZeroOrMore, cl::cat(FilterCategory));
88 cl::opt ExcludeCompilerGenerated(
89 "no-compiler-generated",
90 cl::desc("Don't show compiler generated types and symbols"),
91 cl::cat(FilterCategory));
92 cl::opt
93 ExcludeSystemLibraries("no-system-libs",
94 cl::desc("Don't show symbols from system libraries"),
95 cl::cat(FilterCategory));
7896 }
7997
8098 static void dumpInput(StringRef Path) {
102120 }
103121
104122 LinePrinter Printer(2, outs());
105 Printer.SetTypeFilters(opts::ExcludeTypes.begin(), opts::ExcludeTypes.end());
106 Printer.SetSymbolFilters(opts::ExcludeSymbols.begin(),
107 opts::ExcludeSymbols.end());
108 Printer.SetCompilandFilters(opts::ExcludeCompilands.begin(),
109 opts::ExcludeCompilands.end());
110123
111124 auto GlobalScope(Session->getGlobalScope());
112125 std::string FileName(GlobalScope->getSymbolsFileName());
219232 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
220233
221234 cl::ParseCommandLineOptions(argv.size(), argv.data(), "LLVM PDB Dumper\n");
235 if (opts::ClassDefs)
236 opts::Types = true;
237 if (opts::All) {
238 opts::Compilands = true;
239 opts::Symbols = true;
240 opts::Globals = true;
241 opts::Types = true;
242 opts::ClassDefs = true;
243 }
244 if (opts::ExcludeCompilerGenerated) {
245 opts::ExcludeTypes.push_back("__vc_attributes");
246 opts::ExcludeCompilands.push_back("* Linker *");
247 }
248 if (opts::ExcludeSystemLibraries) {
249 opts::ExcludeCompilands.push_back(
250 "f:\\binaries\\Intermediate\\vctools\\crt_bld");
251 }
222252
223253 #if defined(HAVE_DIA_SDK)
224254 CoInitializeEx(nullptr, COINIT_MULTITHREADED);
99 #ifndef LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H
1010 #define LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H
1111
12 #include "llvm/Support/CommandLine.h"
1213 #include "llvm/Support/raw_ostream.h"
1314
14 namespace llvm {
15 struct newline {
16 newline(int IndentWidth) : Width(IndentWidth) {}
17 int Width;
18 };
15 namespace opts {
16 extern llvm::cl::opt Compilands;
17 extern llvm::cl::opt Symbols;
18 extern llvm::cl::opt Globals;
19 extern llvm::cl::opt Types;
20 extern llvm::cl::opt ClassDefs;
21 extern llvm::cl::opt All;
1922
20 inline raw_ostream &operator<<(raw_ostream &OS, const newline &Indent) {
21 OS << "\n";
22 OS.indent(Indent.Width);
23 return OS;
24 }
23 extern llvm::cl::opt ExcludeCompilerGenerated;
24
25 extern llvm::cl::list ExcludeTypes;
26 extern llvm::cl::list ExcludeSymbols;
27 extern llvm::cl::list ExcludeCompilands;
2528 }
2629
2730 #endif