diff options
| author | Adrian McCarthy <amccarth@google.com> | 2017-04-10 16:43:09 +0000 | 
|---|---|---|
| committer | Adrian McCarthy <amccarth@google.com> | 2017-04-10 16:43:09 +0000 | 
| commit | 08eb343cce893e2594de62f1ab976ed03536cb56 (patch) | |
| tree | 3b347ba58438fd8141fc070cb46d2389974ec645 /llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp | |
| parent | 3eec73e20b8fce19bf2754b270968e876fb31e9d (diff) | |
| download | bcm5719-llvm-08eb343cce893e2594de62f1ab976ed03536cb56.tar.gz bcm5719-llvm-08eb343cce893e2594de62f1ab976ed03536cb56.zip  | |
Improves pretty printing of variable types in llvm-pdbdump
* Adds support for pointers to arrays, which was missing
* Adds some tests
* Improves consistency of const and volatile qualifiers
* Eliminates non-composable special case code for arrays and function by using
  a more general recursive approach
* Has a hack for getting the calling convention into the right spot for
  pointer-to-functions
Given the rapid changes happenning in llvm-pdbdump, this may be difficult to
merge.
Differential Revision: https://reviews.llvm.org/D31832
llvm-svn: 299848
Diffstat (limited to 'llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp')
| -rw-r--r-- | llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp b/llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp index f866132aa88..591d5e70cfd 100644 --- a/llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp +++ b/llvm/tools/llvm-pdbdump/PrettyBuiltinDumper.cpp @@ -20,6 +20,10 @@ BuiltinDumper::BuiltinDumper(LinePrinter &P)      : PDBSymDumper(false), Printer(P) {}  void BuiltinDumper::start(const PDBSymbolTypeBuiltin &Symbol) { +  if (Symbol.isConstType()) +    WithColor(Printer, PDB_ColorItem::Keyword).get() << "const "; +  if (Symbol.isVolatileType()) +    WithColor(Printer, PDB_ColorItem::Keyword).get() << "volatile ";    WithColor(Printer, PDB_ColorItem::Type).get() << getTypeName(Symbol);  }  | 

