[llvm] dc12ccd - Revert "[Coroutines] Fix -Wunused-variable in CoroFrame.cpp (NFC)"

Dmitri Gribenko via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 14:57:21 PDT 2024


Author: Dmitri Gribenko
Date: 2024-08-21T23:50:19+02:00
New Revision: dc12ccd13f98a3f3ec4af07e60f6fe1344965e17

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

LOG: Revert "[Coroutines] Fix -Wunused-variable in CoroFrame.cpp (NFC)"

This reverts commit d48b807aa8abd1cbfe8ac5d1ba27b8b3617fc5e6.

This series of commits causes Clang crashes. The reproducer is posted on
https://github.com/llvm/llvm-project/commit/08a0dece2b2431db8abe650bb43cba01e781e1ce

Added: 
    

Modified: 
    llvm/lib/Transforms/Coroutines/CoroFrame.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
index fa04735340406d..e0e4edd2800b29 100644
--- a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
@@ -1121,7 +1121,8 @@ static void buildFrameDebugInfo(Function &F, coro::Shape &Shape,
 
   DIBuilder DBuilder(*F.getParent(), /*AllowUnresolved*/ false);
 
-  assert(Shape.getPromiseAlloca() &&
+  AllocaInst *PromiseAlloca = Shape.getPromiseAlloca();
+  assert(PromiseAlloca &&
          "Coroutine with switch ABI should own Promise alloca");
 
   DIFile *DFile = DIS->getFile();


        


More information about the llvm-commits mailing list