Skip to content

Commit c1b54d2

Browse files
committed
[clang][wip] Add freeze poison emission to local pointer allocation
1 parent 8eebe30 commit c1b54d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CodeGen/CGDecl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,8 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) {
15971597
} else {
15981598
assert(!emission.useLifetimeMarkers());
15991599
}
1600-
if ((allocaTy->isIntegerTy() || allocaTy->isFloatingPointTy()) &&
1600+
if ((allocaTy->isIntegerTy() || allocaTy->isFloatingPointTy() ||
1601+
allocaTy->isPointerTy()) &&
16011602
HaveInsertPoint()) {
16021603
auto Freeze = Builder.CreateFreeze(llvm::PoisonValue::get(allocaTy),
16031604
"freeze.poison");

0 commit comments

Comments
 (0)