[PATCH] D25073: [DebugInfo]: preparation to implement DW_AT_alignment
Victor Leschuk via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 02:57:47 PDT 2016
vleschuk marked an inline comment as done.
vleschuk added inline comments.
> aprantl wrote in DwarfUnit.cpp:1409
> Why is this correct?
Actually in old code the following is always true
DT->getAlignInBits() == FieldSize;
Because
FieldSize == DD->getBaseTypeSize(DT);
and for bitfields Alignment field was set in the following way:
AlignInBits = CGM.getContext().getTypeAlign(BitFieldDecl->getType());
The variable names are not chosen very well here, I think this part of code needs a little refactoring, however I think it deserves separate commit.
As now we have got rid of getAlignInBits() for bitfields, we just use default type alignment here directly.
https://reviews.llvm.org/D25073
More information about the llvm-commits
mailing list