Author: Fangrui Song Date: 2021-01-08T23:28:22-08:00 New Revision: d466e10ab1314e361d127fee6b5ac927964fd121
URL: https://github.com/llvm/llvm-project/commit/d466e10ab1314e361d127fee6b5ac927964fd121 DIFF: https://github.com/llvm/llvm-project/commit/d466e10ab1314e361d127fee6b5ac927964fd121.diff LOG: [IR] Delete unused ReplaceLast in DebugLoc::appendInlineAt Not used after r304488 Added: Modified: llvm/include/llvm/IR/DebugLoc.h llvm/lib/IR/DebugLoc.cpp Removed: ################################################################################ diff --git a/llvm/include/llvm/IR/DebugLoc.h b/llvm/include/llvm/IR/DebugLoc.h index 36b5c12f4ba7..4824f2e9f2fd 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<const MDNode *, MDNode *> &Cache, - bool ReplaceLast = false); + DenseMap<const MDNode *, MDNode *> &Cache); unsigned getLine() const; unsigned getCol() const; diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp index 1aba5bf664c4..993f3a39e6ff 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<const MDNode *, MDNode *> &Cache, - bool ReplaceLast) { + DenseMap<const MDNode *, MDNode *> &Cache) { SmallVector<DILocation *, 3> 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; } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits