diff --git a/llvm/include/llvm/IR/DebugLoc.h b/llvm/include/llvm/IR/DebugLoc.h index 780d17a33661f8..4914d733fe0da8 100644 --- a/llvm/include/llvm/IR/DebugLoc.h +++ b/llvm/include/llvm/IR/DebugLoc.h @@ -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 &Cache, bool ReplaceLast = false); diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp index 14d1396f154339..e945cbcba78254 100644 --- a/llvm/lib/IR/DebugLoc.cpp +++ b/llvm/lib/IR/DebugLoc.cpp @@ -79,7 +79,7 @@ DebugLoc DebugLoc::get(unsigned Line, unsigned Col, const MDNode *Scope, const_cast(InlinedAt), ImplicitCode); } -DebugLoc DebugLoc::appendInlinedAt(DebugLoc DL, DILocation *InlinedAt, +DebugLoc DebugLoc::appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt, LLVMContext &Ctx, DenseMap &Cache, bool ReplaceLast) {