diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-08 19:09:22 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-08 19:09:22 +0000 |
commit | c321e534022768d424cf5c5ab43f99489e55bf07 (patch) | |
tree | b8cb4306701534ee6e9ee7ea055dbc25b0c92494 /llvm/utils/TableGen/DAGISelMatcherGen.cpp | |
parent | 19e88c1ff696313db48618d6ced7afcd5253fe35 (diff) | |
download | bcm5719-llvm-c321e534022768d424cf5c5ab43f99489e55bf07.tar.gz bcm5719-llvm-c321e534022768d424cf5c5ab43f99489e55bf07.zip |
Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.
llvm-svn: 272190
Diffstat (limited to 'llvm/utils/TableGen/DAGISelMatcherGen.cpp')
-rw-r--r-- | llvm/utils/TableGen/DAGISelMatcherGen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcherGen.cpp b/llvm/utils/TableGen/DAGISelMatcherGen.cpp index 04d8ff0b8e6..4110e9725b5 100644 --- a/llvm/utils/TableGen/DAGISelMatcherGen.cpp +++ b/llvm/utils/TableGen/DAGISelMatcherGen.cpp @@ -116,7 +116,7 @@ namespace { /// If this is the first time a node with unique identifier Name has been /// seen, record it. Otherwise, emit a check to make sure this is the same /// node. Returns true if this is the first encounter. - bool recordUniqueNode(std::string Name); + bool recordUniqueNode(const std::string &Name); // Result Code Generation. unsigned getNamedArgumentSlot(StringRef Name) { @@ -438,7 +438,7 @@ void MatcherGen::EmitOperatorMatchCode(const TreePatternNode *N, } } -bool MatcherGen::recordUniqueNode(std::string Name) { +bool MatcherGen::recordUniqueNode(const std::string &Name) { unsigned &VarMapEntry = VariableMap[Name]; if (VarMapEntry == 0) { // If it is a named node, we must emit a 'Record' opcode. |