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/lib/Linker | |
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/lib/Linker')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 14a25612259..ff36f90b53f 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -44,7 +44,7 @@ class ModuleLinker { /// The mover has just hit GV and we have to decide if it, and other members /// of the same comdat, should be linked. Every member to be linked is passed /// to Add. - void addLazyFor(GlobalValue &GV, IRMover::ValueAdder Add); + void addLazyFor(GlobalValue &GV, const IRMover::ValueAdder &Add); bool shouldLinkReferencedLinkOnce() { return !(Flags & Linker::DontForceLinkLinkonceODR); @@ -416,7 +416,7 @@ bool ModuleLinker::linkIfNeeded(GlobalValue &GV) { return false; } -void ModuleLinker::addLazyFor(GlobalValue &GV, IRMover::ValueAdder Add) { +void ModuleLinker::addLazyFor(GlobalValue &GV, const IRMover::ValueAdder &Add) { if (!shouldLinkReferencedLinkOnce()) // For ThinLTO we don't import more than what was required. // The client has to guarantee that the linkonce will be availabe at link |