Skip to content

Commit 9284b03

Browse files
committed
[Coroutines] Remove unused variable [NFC]
gcc warned about it: ../lib/Transforms/Coroutines/CoroFrame.cpp:2785:15: warning: unused variable 'MD' [-Wunused-variable] 2785 | if (MDNode *MD = AI->getMetadata(LLVMContext::MD_coro_outside_frame)) | ^~ Fix the warning by removing the unused variable and change the call from getMetadata to hasMetadata.
1 parent 2cd2445 commit 9284b03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Coroutines/CoroFrame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,7 @@ static void collectFrameAlloca(AllocaInst *AI, coro::Shape &Shape,
27822782

27832783
// The __coro_gro alloca should outlive the promise, make sure we
27842784
// keep it outside the frame.
2785-
if (MDNode *MD = AI->getMetadata(LLVMContext::MD_coro_outside_frame))
2785+
if (AI->hasMetadata(LLVMContext::MD_coro_outside_frame))
27862786
return;
27872787

27882788
// The code that uses lifetime.start intrinsic does not work for functions

0 commit comments

Comments
 (0)