From 6b345575c41a175f8f3440efca7b572b9b4c1570 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sat, 24 Mar 2018 21:22:32 +0000 Subject: [PATCH] [SchedModel] Record::getName() returns StringRef - avoid std::string creation. NFCI. llvm-svn: 328437 --- utils/TableGen/CodeGenSchedule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/TableGen/CodeGenSchedule.cpp b/utils/TableGen/CodeGenSchedule.cpp index b73e0767e3b..ff5353d3ec3 100644 --- a/utils/TableGen/CodeGenSchedule.cpp +++ b/utils/TableGen/CodeGenSchedule.cpp @@ -387,9 +387,9 @@ void CodeGenSchedModels::collectSchedRW() { RecVec RWDefs = Records.getAllDerivedDefinitions("SchedReadWrite"); for (Record *RWDef : RWDefs) { if (!getSchedRWIdx(RWDef, RWDef->isSubClassOf("SchedRead"))) { - const std::string &Name = RWDef->getName(); + StringRef Name = RWDef->getName(); if (Name != "NoWrite" && Name != "ReadDefault") - dbgs() << "Unused SchedReadWrite " << RWDef->getName() << '\n'; + dbgs() << "Unused SchedReadWrite " << Name << '\n'; } }); }