mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[llvm-pdbdump] Add regex-based filtering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,9 +22,8 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
TypeDumper::TypeDumper(LinePrinter &P, bool Inline, bool ClassDefs)
|
||||
: PDBSymDumper(true), Printer(P), InlineDump(Inline),
|
||||
FullClassDefs(ClassDefs) {}
|
||||
TypeDumper::TypeDumper(LinePrinter &P, bool ClassDefs)
|
||||
: PDBSymDumper(true), Printer(P), FullClassDefs(ClassDefs) {}
|
||||
|
||||
void TypeDumper::start(const PDBSymbolExe &Exe, raw_ostream &OS, int Indent) {
|
||||
auto Enums = Exe.findAllChildren<PDBSymbolTypeEnum>();
|
||||
@@ -59,9 +58,9 @@ void TypeDumper::dump(const PDBSymbolTypeEnum &Symbol, raw_ostream &OS,
|
||||
int Indent) {
|
||||
if (Symbol.getUnmodifiedTypeId() != 0)
|
||||
return;
|
||||
|
||||
if (!InlineDump)
|
||||
Printer.NewLine();
|
||||
if (Printer.IsTypeExcluded(Symbol.getName()))
|
||||
return;
|
||||
Printer.NewLine();
|
||||
|
||||
WithColor(Printer, PDB_ColorItem::Keyword).get() << "enum ";
|
||||
WithColor(Printer, PDB_ColorItem::Identifier).get() << Symbol.getName();
|
||||
@@ -69,9 +68,10 @@ void TypeDumper::dump(const PDBSymbolTypeEnum &Symbol, raw_ostream &OS,
|
||||
|
||||
void TypeDumper::dump(const PDBSymbolTypeTypedef &Symbol, raw_ostream &OS,
|
||||
int Indent) {
|
||||
if (!InlineDump)
|
||||
Printer.NewLine();
|
||||
if (Printer.IsTypeExcluded(Symbol.getName()))
|
||||
return;
|
||||
|
||||
Printer.NewLine();
|
||||
TypedefDumper Dumper(Printer);
|
||||
Dumper.start(Symbol, OS, Indent);
|
||||
}
|
||||
@@ -80,8 +80,10 @@ void TypeDumper::dump(const PDBSymbolTypeUDT &Symbol, raw_ostream &OS,
|
||||
int Indent) {
|
||||
if (Symbol.getUnmodifiedTypeId() != 0)
|
||||
return;
|
||||
if (!InlineDump)
|
||||
Printer.NewLine();
|
||||
if (Printer.IsTypeExcluded(Symbol.getName()))
|
||||
return;
|
||||
|
||||
Printer.NewLine();
|
||||
|
||||
if (FullClassDefs) {
|
||||
ClassDefinitionDumper Dumper(Printer);
|
||||
|
Reference in New Issue
Block a user