[PATCH] D33710: [TableGen] Make Record::getValueAsString and getValueAsListOfStrings return StringRefs instead of std::string
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 23:46:34 PDT 2017
craig.topper added inline comments.
================
Comment at: utils/TableGen/OptParserEmitter.cpp:57
+ if (int Cmp = StrCmpOptionName(A->getValueAsString("Name").str().c_str(),
+ B->getValueAsString("Name").str().c_str()))
return Cmp;
----------------
This is a bit of a hack because the compare function expects a null terminated const char* array which the StringRef doesn't guarantee so I had to create a string first. This can be cleaned up in a future commit.
https://reviews.llvm.org/D33710
More information about the llvm-commits
mailing list