Skip to content

Commit

Permalink
[NFC][Clang][OpaquePtr] Move away from deprecated Address constructor…
Browse files Browse the repository at this point in the history
… in EmitNewArrayInitializer()

Specify the Address element type, which is the same for all pointers in the array.
  • Loading branch information
aeubanks committed Jan 27, 2022
1 parent fa90c9d commit 63cf206
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clang/lib/CodeGen/CGExprCXX.cpp
Expand Up @@ -1108,10 +1108,10 @@ void CodeGenFunction::EmitNewArrayInitializer(
StoreAnyExprIntoOneUnit(*this, ILE->getInit(i),
ILE->getInit(i)->getType(), CurPtr,
AggValueSlot::DoesNotOverlap);
CurPtr = Address(Builder.CreateInBoundsGEP(CurPtr.getElementType(),
CurPtr.getPointer(),
Builder.getSize(1),
"array.exp.next"),
CurPtr = Address(Builder.CreateInBoundsGEP(
CurPtr.getElementType(), CurPtr.getPointer(),
Builder.getSize(1), "array.exp.next"),
CurPtr.getElementType(),
StartAlign.alignmentAtOffset((i + 1) * ElementSize));
}

Expand Down

0 comments on commit 63cf206

Please sign in to comment.