[IR] Delete unused ReplaceLast in DebugLoc::appendInlineAt
authorFangrui Song <i@maskray.me>
Sat, 9 Jan 2021 07:28:22 +0000 (23:28 -0800)
committerFangrui Song <i@maskray.me>
Sat, 9 Jan 2021 07:28:22 +0000 (23:28 -0800)
Not used after r304488

llvm/include/llvm/IR/DebugLoc.h
llvm/lib/IR/DebugLoc.cpp

index 36b5c12..4824f2e 100644 (file)
@@ -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;
index 1aba5bf..993f3a3 100644 (file)
@@ -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;
   }