diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-10 19:55:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-10 19:55:17 +0000 |
commit | b1919e2f08ecb37140af676fd2916f8d5ed7df3d (patch) | |
tree | c9373916caa20f1b69a6b4a5aa81c7c698c05d6f /lib/CodeGen/AsmPrinter.cpp | |
parent | 68ce9ba666a7eb8c7eb3fb7888e4418fffd2e716 (diff) |
Privatize StructLayout::MemberOffsets, adding an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 0394a02aa1..6dac1ea375 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -739,8 +739,8 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) { // Check if padding is needed and insert one or more 0s. uint64_t fieldSize = TD->getTypeSize(field->getType()); uint64_t padSize = ((i == e-1? cvsLayout->StructSize - : cvsLayout->MemberOffsets[i+1]) - - cvsLayout->MemberOffsets[i]) - fieldSize; + : cvsLayout->getElementOffset(i+1)) + - cvsLayout->getElementOffset(i)) - fieldSize; sizeSoFar += fieldSize + padSize; // Now print the actual field value |