summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-12-04 05:48:03 +0000
committerMatthias Braun <matze@braunis.de>2016-12-04 05:48:03 +0000
commit5ce905766623bc0039fd5ae158ac99ae990acae5 (patch)
treea7b7bdf2fbb68ac4d22394afc0673564d537f362 /llvm/lib/TableGen/TGParser.cpp
parent28f22ae15eb3df52138b5d15cfb435debf7a144f (diff)
downloadbcm5719-llvm-5ce905766623bc0039fd5ae158ac99ae990acae5.tar.gz
bcm5719-llvm-5ce905766623bc0039fd5ae158ac99ae990acae5.zip
TableGen: Use StringRef instead of const std::string& for parameters
This avoid an extra construction of a std::string (and a heap allocation) when the caller only has a StringRef but no std::string at hand. llvm-svn: 288610
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index ff5c96b0cd5..3d0e4875f96 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -715,8 +715,7 @@ RecTy *TGParser::ParseType() {
/// ParseIDValue - This is just like ParseIDValue above, but it assumes the ID
/// has already been read.
-Init *TGParser::ParseIDValue(Record *CurRec,
- const std::string &Name, SMLoc NameLoc,
+Init *TGParser::ParseIDValue(Record *CurRec, StringRef Name, SMLoc NameLoc,
IDParseMode Mode) {
if (CurRec) {
if (const RecordVal *RV = CurRec->getValue(Name))
OpenPOWER on IntegriCloud