mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Privatize StructLayout::MemberOffsets, adding an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -70,7 +70,7 @@ static bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV,
|
||||
|
||||
if (const StructType *ST = dyn_cast<StructType>(*GTI)) {
|
||||
// N = N + Offset
|
||||
Offset += TD.getStructLayout(ST)->MemberOffsets[CI->getZExtValue()];
|
||||
Offset += TD.getStructLayout(ST)->getElementOffset(CI->getZExtValue());
|
||||
} else {
|
||||
const SequentialType *ST = cast<SequentialType>(*GTI);
|
||||
Offset += TD.getTypeSize(ST->getElementType())*CI->getSExtValue();
|
||||
|
Reference in New Issue
Block a user