This is an archive of the discontinued LLVM Phabricator instance.

Fix usage in TableGen of getValueAsString
ClosedPublic

Authored by erichkeane on Oct 16 2017, 2:49 PM.

Details

Summary

Record::getValueAsString returns a stringref to an interned
string (apparently had been changed since most of tablegen was
written). In this patch, I audited the usage of getValueAsString
to find places where we can trivially stop storing 'std::string' and instead
keep the stringref.

There was one instance where an unnecessary 'stringstream' was being used,
so that has been removed as well to unblock the stringref replacing string fix.

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Oct 16 2017, 2:49 PM
aaron.ballman accepted this revision.Oct 16 2017, 3:19 PM

LGTM, thank you for the cleanup!

This revision is now accepted and ready to land.Oct 16 2017, 3:19 PM
This revision was automatically updated to reflect the committed changes.