[llvm] 2a95d47 - [DebugInfo] Follow up to 34cdc91321 to fix a crash

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 08:57:41 PST 2023


Author: Jeremy Morse
Date: 2023-12-05T16:56:22Z
New Revision: 2a95d47ed53e959017c345860df80898699cefb5

URL: https://github.com/llvm/llvm-project/commit/2a95d47ed53e959017c345860df80898699cefb5
DIFF: https://github.com/llvm/llvm-project/commit/2a95d47ed53e959017c345860df80898699cefb5.diff

LOG: [DebugInfo] Follow up to 34cdc91321 to fix a crash

We're removing trailing debug-records at the correct time, but from the
wrong block. Broken the iterators buildbot:

  https://lab.llvm.org/buildbot/#/builders/275/builds/1889

Added: 
    

Modified: 
    llvm/lib/IR/BasicBlock.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 872386ddb54b2..f364c56a42c52 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -1000,7 +1000,7 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src,
     OntoDest->absorbDebugValues(*FromLast, true);
     if (LastIsEnd) {
       FromLast->eraseFromParent();
-      deleteTrailingDPValues();
+      Src->deleteTrailingDPValues();
     }
   }
 


        


More information about the llvm-commits mailing list