Skip to content

Commit 8949d8a

Browse files
committed
Address review
1 parent 93a5f21 commit 8949d8a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3868,13 +3868,11 @@ static void emitGlobalConstantImpl(const DataLayout &DL, const Constant *CV,
38683868
uint64_t SizeSoFar = 0;
38693869
for (unsigned int i = 0, n = structType->getNumElements(); i < n - 1;
38703870
++i) {
3871-
emitGlobalAliasInline(AP, Offset + SizeSoFar, AliasList);
38723871
uint64_t GapToNext = Layout->getElementOffset(i + 1) - SizeSoFar;
38733872
AP.OutStreamer->emitZeros(GapToNext);
38743873
SizeSoFar += GapToNext;
3874+
emitGlobalAliasInline(AP, Offset + SizeSoFar, AliasList);
38753875
}
3876-
emitGlobalAliasInline(AP, Offset + SizeSoFar, AliasList);
3877-
uint64_t Size = DL.getTypeAllocSize(structType);
38783876
AP.OutStreamer->emitZeros(Size - SizeSoFar);
38793877
return;
38803878
} else {

0 commit comments

Comments
 (0)