Skip to content
Commit 2b8419a2 authored by Craig Topper's avatar Craig Topper
Browse files

[TableGen] Make Record::getValueAsString and getValueAsListOfStrings return...

[TableGen] Make Record::getValueAsString and getValueAsListOfStrings return StringRefs instead of std::string

Internally both these methods just return the result of getValue on either a StringInit or a CodeInit object. In both cases this returns a StringRef pointing to a string allocated in the BumpPtrAllocator so its not going anywhere. So we can just pass that StringRef along.

This is a fairly naive patch that targets just the build failures caused by this change. There's additional work that can be done to avoid creating std::string at call sites that still think getValueAsString returns a std::string. I'll try to clean those up in future patches.

Differential Revision: https://reviews.llvm.org/D33710

llvm-svn: 304325
parent fa5dc092
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment