This is an archive of the discontinued LLVM Phabricator instance.

Don't print a type of variable in Address::Dump if it's unknown (i.e. nullptr)
ClosedPublic

Authored by ki.stfu on Apr 25 2015, 2:32 PM.

Diff Detail

Event Timeline

ki.stfu updated this revision to Diff 24433.Apr 25 2015, 2:32 PM
ki.stfu retitled this revision from to Don't print a type of variable in Address::Dump if it's unknown (i.e. nullptr).
ki.stfu updated this object.
ki.stfu edited the test plan for this revision. (Show Details)
ki.stfu added subscribers: jingham, clayborg, granata.enrico, Unknown Object (MLST).
granata.enrico added inline comments.Apr 25 2015, 2:57 PM
source/Core/Address.cpp
753

Just a minor idea for an improvement here

if (type)

s->Printf (", type = \"%s\"", type->GetName().GetCString());

else

s->Printf (", type = <unknown>");

Looks to me like printing some marker when we can't figure out the type is better than just leaving it out entirely

ki.stfu planned changes to this revision.Apr 25 2015, 3:27 PM
ki.stfu added inline comments.
source/Core/Address.cpp
753

thx for the suggestion. I'll do that.

ki.stfu updated this revision to Diff 24440.Apr 26 2015, 12:59 AM

Print <unknown> when type is null

clayborg accepted this revision.Apr 27 2015, 9:48 AM
clayborg edited edge metadata.

Looks fine.

This revision is now accepted and ready to land.Apr 27 2015, 9:48 AM
ki.stfu closed this revision.Apr 28 2015, 5:49 AM