From: Fangrui Song Date: Sat, 9 Jan 2021 07:28:22 +0000 (-0800) Subject: [IR] Delete unused ReplaceLast in DebugLoc::appendInlineAt X-Git-Tag: llvmorg-13-init~1642 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d466e10ab1314e361d127fee6b5ac927964fd121;p=platform%2Fupstream%2Fllvm.git [IR] Delete unused ReplaceLast in DebugLoc::appendInlineAt Not used after r304488 --- diff --git a/llvm/include/llvm/IR/DebugLoc.h b/llvm/include/llvm/IR/DebugLoc.h index 36b5c12..4824f2e 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 1aba5bf..993f3a3 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; }