File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -3504,16 +3504,22 @@ class AllocaSliceRewriter : public InstVisitor<AllocaSliceRewriter, bool> {
35043504 // for the new alloca slice.
35053505 Type *PointerTy = IRB.getPtrTy (OldPtr->getType ()->getPointerAddressSpace ());
35063506 Value *Ptr = getNewAllocaSlicePtr (IRB, PointerTy);
3507- #ifndef _WIN32
3507+ bool bShouldDisableLifetimeMarker = false ;
3508+
3509+ if (II.getParent () && II.getParent ()->getParent () && II.getParent ()->getParent ()->hasSEHOrCXXSEH ()) {
3510+ bShouldDisableLifetimeMarker = true ;
3511+ }
3512+
3513+ if (!bShouldDisableLifetimeMarker) {
35083514 Value *New;
35093515 if (II.getIntrinsicID () == Intrinsic::lifetime_start)
35103516 New = IRB.CreateLifetimeStart (Ptr, Size);
35113517 else
35123518 New = IRB.CreateLifetimeEnd (Ptr, Size);
35133519
3514- (void )New;
3515- LLVM_DEBUG (dbgs () << " to: " << *New << " \n " );
3516- # endif
3520+ (void )New;
3521+ LLVM_DEBUG (dbgs () << " to: " << *New << " \n " );
3522+ }
35173523 return true ;
35183524 }
35193525
You can’t perform that action at this time.
0 commit comments