mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +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:
@ -878,7 +878,8 @@ void MachOWriter::InitMem(const Constant *C, void *Addr, intptr_t Offset,
|
||||
const StructLayout *SL =
|
||||
TD->getStructLayout(cast<StructType>(CPS->getType()));
|
||||
for (unsigned i = 0, e = CPS->getNumOperands(); i != e; ++i)
|
||||
WorkList.push_back(CPair(CPS->getOperand(i), PA+SL->MemberOffsets[i]));
|
||||
WorkList.push_back(CPair(CPS->getOperand(i),
|
||||
PA+SL->getElementOffset(i)));
|
||||
} else {
|
||||
cerr << "Bad Type: " << *PC->getType() << "\n";
|
||||
assert(0 && "Unknown constant type to initialize memory with!");
|
||||
|
Reference in New Issue
Block a user