This is an archive of the discontinued LLVM Phabricator instance.

Add ConstString::IsNull() to tell between null vs. empty strings and fix usage in Mangled::GetDemangledName()
ClosedPublic

Authored by sgraenitz on Aug 6 2018, 4:42 AM.

Details

Summary

IsEmpty() and operator bool() == false have equal semantics. Usage in Mangled::GetDemangledName() was incorrect. What it actually wants is a check for null-string. Split this off of D50071 and added a test to clarify usage.

Event Timeline

sgraenitz created this revision.Aug 6 2018, 4:42 AM
labath accepted this revision.Aug 6 2018, 7:02 AM

LGTM. Thanks for splitting this out.

This revision is now accepted and ready to land.Aug 6 2018, 7:02 AM
This revision was automatically updated to reflect the committed changes.