diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-05-31 21:12:46 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-05-31 21:12:46 +0000 |
commit | bcd3c37f4a4f6d7b6b66984bf69a69b85364b017 (patch) | |
tree | aaa44eba0ecb65d9fa05cf813609e0af1f0bea2b /llvm/utils/TableGen/SubtargetEmitter.cpp | |
parent | 8b7061049403323a2872e031cbb7222b2a85ff97 (diff) | |
download | bcm5719-llvm-bcd3c37f4a4f6d7b6b66984bf69a69b85364b017.tar.gz bcm5719-llvm-bcd3c37f4a4f6d7b6b66984bf69a69b85364b017.zip |
[TableGen] Adapt more places to getValueAsString now returning a StringRef instead of a std::string.
llvm-svn: 304347
Diffstat (limited to 'llvm/utils/TableGen/SubtargetEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/SubtargetEmitter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/SubtargetEmitter.cpp b/llvm/utils/TableGen/SubtargetEmitter.cpp index 1903f405d85..7e9f552eccc 100644 --- a/llvm/utils/TableGen/SubtargetEmitter.cpp +++ b/llvm/utils/TableGen/SubtargetEmitter.cpp @@ -180,9 +180,9 @@ unsigned SubtargetEmitter::FeatureKeyValues(raw_ostream &OS) { // Next feature Record *Feature = FeatureList[i]; - const std::string &Name = Feature->getName(); - const std::string &CommandLineName = Feature->getValueAsString("Name"); - const std::string &Desc = Feature->getValueAsString("Desc"); + StringRef Name = Feature->getName(); + StringRef CommandLineName = Feature->getValueAsString("Name"); + StringRef Desc = Feature->getValueAsString("Desc"); if (CommandLineName.empty()) continue; @@ -237,7 +237,7 @@ unsigned SubtargetEmitter::CPUKeyValues(raw_ostream &OS) { // Next processor Record *Processor = ProcessorList[i]; - const std::string &Name = Processor->getValueAsString("Name"); + StringRef Name = Processor->getValueAsString("Name"); const std::vector<Record*> &FeatureList = Processor->getValueAsListOfDefs("Features"); @@ -1212,7 +1212,7 @@ void SubtargetEmitter::EmitProcessorLookup(raw_ostream &OS) { // Next processor Record *Processor = ProcessorList[i]; - const std::string &Name = Processor->getValueAsString("Name"); + StringRef Name = Processor->getValueAsString("Name"); const std::string &ProcModelName = SchedModels.getModelForProc(Processor).ModelName; @@ -1360,9 +1360,9 @@ void SubtargetEmitter::ParseFeaturesFunction(raw_ostream &OS, for (Record *R : Features) { // Next record - const std::string &Instance = R->getName(); - const std::string &Value = R->getValueAsString("Value"); - const std::string &Attribute = R->getValueAsString("Attribute"); + StringRef Instance = R->getName(); + StringRef Value = R->getValueAsString("Value"); + StringRef Attribute = R->getValueAsString("Attribute"); if (Value=="true" || Value=="false") OS << " if (Bits[" << Target << "::" |