summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGLoopInfo.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-11-24 16:01:20 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-11-24 16:01:20 +0000
commitb1f9c060a1d2b78c8bb96dde8e524cb550b10375 (patch)
treef38c2547df08e82d918336dbdd802335f2f57d0c /lib/CodeGen/CGLoopInfo.h
parentb84738cb8b7beaf427d58aa31d7bc3c7f279713b (diff)
[CodeGen] Pass objects that are expensive to copy by const ref.
No functionality change. Found by clang-tidy's performance-unnecessary-value-param. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGLoopInfo.h')
-rw-r--r--lib/CodeGen/CGLoopInfo.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGLoopInfo.h b/lib/CodeGen/CGLoopInfo.h
index e2c9770531..15608c105d 100644
--- a/lib/CodeGen/CGLoopInfo.h
+++ b/lib/CodeGen/CGLoopInfo.h
@@ -67,7 +67,7 @@ class LoopInfo {
public:
/// \brief Construct a new LoopInfo for the loop with entry Header.
LoopInfo(llvm::BasicBlock *Header, const LoopAttributes &Attrs,
- llvm::DebugLoc StartLoc, llvm::DebugLoc EndLoc);
+ const llvm::DebugLoc &StartLoc, const llvm::DebugLoc &EndLoc);
/// \brief Get the loop id metadata for this loop.
llvm::MDNode *getLoopID() const { return LoopID; }
@@ -99,14 +99,14 @@ public:
/// \brief Begin a new structured loop. The set of staged attributes will be
/// applied to the loop and then cleared.
- void push(llvm::BasicBlock *Header, llvm::DebugLoc StartLoc,
- llvm::DebugLoc EndLoc);
+ void push(llvm::BasicBlock *Header, const llvm::DebugLoc &StartLoc,
+ const llvm::DebugLoc &EndLoc);
/// \brief Begin a new structured loop. Stage attributes from the Attrs list.
/// The staged attributes are applied to the loop and then cleared.
void push(llvm::BasicBlock *Header, clang::ASTContext &Ctx,
- llvm::ArrayRef<const Attr *> Attrs, llvm::DebugLoc StartLoc,
- llvm::DebugLoc EndLoc);
+ llvm::ArrayRef<const Attr *> Attrs, const llvm::DebugLoc &StartLoc,
+ const llvm::DebugLoc &EndLoc);
/// \brief End the current loop.
void pop();