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/CodeGen | |
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/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp index d614dfd6fc8..b66084be821 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp @@ -178,7 +178,7 @@ void DwarfExpression::AddUnsignedConstant(unsigned Value) { AddStackValue(); } -void DwarfExpression::AddUnsignedConstant(APInt Value) { +void DwarfExpression::AddUnsignedConstant(const APInt &Value) { unsigned Size = Value.getBitWidth(); const uint64_t *Data = Value.getRawData(); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h index 318d8d3d765..e8a8025add9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h @@ -100,7 +100,7 @@ public: /// Emit an unsigned constant. void AddUnsignedConstant(unsigned Value); /// Emit an unsigned constant. - void AddUnsignedConstant(APInt Value); + void AddUnsignedConstant(const APInt &Value); /// \brief Emit an entire expression on top of a machine register location. /// |