summaryrefslogtreecommitdiff
path: root/utils/TableGen/SubtargetEmitter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-01 20:58:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-01 20:58:36 +0000
commitf382538d471e38a9b98f016c4caebd24c8d60b62 (patch)
treed30f3d58b1044b5355d50c17a6a96c6a0b35703a /utils/TableGen/SubtargetEmitter.cpp
parentee2f195dd3e40f49698ca4dc2666ec09c770e80d (diff)
Diffstat (limited to 'utils/TableGen/SubtargetEmitter.cpp')
-rw-r--r--utils/TableGen/SubtargetEmitter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp
index 1903f405d8598..7e9f552eccc0c 100644
--- a/utils/TableGen/SubtargetEmitter.cpp
+++ b/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 << "::"