diff --git a/llvm/include/llvm/IR/DebugLoc.h b/llvm/include/llvm/IR/DebugLoc.h index 36b5c12f4ba7ee..4824f2e9f2fd1b 100644 --- a/llvm/include/llvm/IR/DebugLoc.h +++ b/llvm/include/llvm/IR/DebugLoc.h @@ -72,11 +72,9 @@ namespace llvm { /// Rebuild the entire inlined-at chain for this instruction so that the top of /// 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(const DebugLoc &DL, DILocation *InlinedAt, LLVMContext &Ctx, - DenseMap &Cache, - bool ReplaceLast = false); + DenseMap &Cache); unsigned getLine() const; unsigned getCol() const; diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp index 1aba5bf664c4e4..993f3a39e6ffac 100644 --- a/llvm/lib/IR/DebugLoc.cpp +++ b/llvm/lib/IR/DebugLoc.cpp @@ -70,8 +70,7 @@ void DebugLoc::setImplicitCode(bool ImplicitCode) { DebugLoc DebugLoc::appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt, LLVMContext &Ctx, - DenseMap &Cache, - bool ReplaceLast) { + DenseMap &Cache) { SmallVector InlinedAtLocations; DILocation *Last = InlinedAt; DILocation *CurInlinedAt = DL; @@ -84,8 +83,6 @@ DebugLoc DebugLoc::appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt, break; } - if (ReplaceLast && !IA->getInlinedAt()) - break; InlinedAtLocations.push_back(IA); CurInlinedAt = IA; }