This is an archive of the discontinued LLVM Phabricator instance.

[llvm-pdbutil] Pretty print PDBSymbolUsingNamespace symbols
ClosedPublic

Authored by asmith on Oct 2 2018, 1:41 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

asmith created this revision.Oct 2 2018, 1:41 PM
zturner added inline comments.Oct 2 2018, 1:48 PM
tools/llvm-pdbutil/PrettyCompilandDumper.cpp
226 ↗(On Diff #168015)

We try to make it look like actual C++ code. So with that in mind we should put a space between the two words and colorize them as C++ keywords. Can you write this as:

WithColor(Printer, PDB_ColorItem::Keyword).get() << "using namespace ";
zturner added inline comments.Oct 2 2018, 1:49 PM
tools/llvm-pdbutil/PrettyCompilandDumper.cpp
228–229 ↗(On Diff #168015)

Also I think we can drop the if statement here and write this all on line line.

WithColor(Printer, PDB_ColorItem::Identifier).get() << Symbol.getName();

If the string is empty it will just be a no-op, which is fine.

asmith updated this revision to Diff 169048.Oct 10 2018, 10:39 AM
asmith marked an inline comment as done.
This revision was not accepted when it landed; it landed in state Needs Review.Oct 11 2018, 2:40 PM
This revision was automatically updated to reflect the committed changes.