forked from OSchip/llvm-project
Pass DebugLoc::appendInlinedAt DebugLoc arg by const reference not value.
Noticed by clang-tidy performance-unnecessary-value-param warning.
This commit is contained in:
parent
d36f2c6a6c
commit
0ae989a1fe
|
@ -85,7 +85,7 @@ namespace llvm {
|
|||
/// the chain now is inlined-at the new call site.
|
||||
/// \param InlinedAt The new outermost inlined-at in the chain.
|
||||
/// \param ReplaceLast Replace the last location in the inlined-at chain.
|
||||
static DebugLoc appendInlinedAt(DebugLoc DL, DILocation *InlinedAt,
|
||||
static DebugLoc appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt,
|
||||
LLVMContext &Ctx,
|
||||
DenseMap<const MDNode *, MDNode *> &Cache,
|
||||
bool ReplaceLast = false);
|
||||
|
|
|
@ -79,7 +79,7 @@ DebugLoc DebugLoc::get(unsigned Line, unsigned Col, const MDNode *Scope,
|
|||
const_cast<MDNode *>(InlinedAt), ImplicitCode);
|
||||
}
|
||||
|
||||
DebugLoc DebugLoc::appendInlinedAt(DebugLoc DL, DILocation *InlinedAt,
|
||||
DebugLoc DebugLoc::appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt,
|
||||
LLVMContext &Ctx,
|
||||
DenseMap<const MDNode *, MDNode *> &Cache,
|
||||
bool ReplaceLast) {
|
||||
|
|
Loading…
Reference in New Issue