diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-27 12:30:51 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-05-27 12:30:51 +0000 |
commit | 4fed928f53dbea24914bc0db307e0988c6e44c8c (patch) | |
tree | d6c73577b5531048e54fb19c78b8e316b7fc66ad /llvm/lib/Transforms/IPO/SampleProfile.cpp | |
parent | c91e38c5ebf6f0cfbb29eff66c5ff6db43c3ee45 (diff) | |
download | bcm5719-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/Transforms/IPO/SampleProfile.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/SampleProfile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index afafd45bec0..deba6ea0661 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -445,7 +445,7 @@ void SampleProfileLoader::printBlockWeight(raw_ostream &OS, /// \returns the weight of \p Inst. ErrorOr<uint64_t> SampleProfileLoader::getInstWeight(const Instruction &Inst) const { - DebugLoc DLoc = Inst.getDebugLoc(); + const DebugLoc &DLoc = Inst.getDebugLoc(); if (!DLoc) return std::error_code(); |