summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-05-27 12:30:51 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-05-27 12:30:51 +0000
commit4fed928f53dbea24914bc0db307e0988c6e44c8c (patch)
treed6c73577b5531048e54fb19c78b8e316b7fc66ad /llvm/lib/Target/ARM/ARMAsmPrinter.cpp
parentc91e38c5ebf6f0cfbb29eff66c5ff6db43c3ee45 (diff)
downloadbcm5719-llvm-4fed928f53dbea24914bc0db307e0988c6e44c8c.tar.gz
bcm5719-llvm-4fed928f53dbea24914bc0db307e0988c6e44c8c.zip
Avoid some copies by using const references.
clang-tidy's performance-unnecessary-copy-initialization with some manual fixes. No functional changes intended. llvm-svn: 270988
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 71823e47009..9ad7f9cc9d5 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -642,7 +642,7 @@ void ARMAsmPrinter::emitAttributes() {
static_cast<const ARMBaseTargetMachine &>(TM);
const ARMSubtarget STI(TT, CPU, ArchFS, ATM, ATM.isLittleEndian());
- std::string CPUString = STI.getCPUString();
+ const std::string &CPUString = STI.getCPUString();
if (CPUString.find("generic") != 0) { //CPUString doesn't start with "generic"
// FIXME: remove krait check when GNU tools support krait cpu
OpenPOWER on IntegriCloud