aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index b14c19d5b4..8bae7bbb92 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -503,7 +503,7 @@ unsigned MachineConstantPool::getConstantPoolIndex(Constant *C,
unsigned Offset = 0;
if (!Constants.empty()) {
Offset = Constants.back().getOffset();
- Offset += TD->getABITypeSize(Constants.back().getType());
+ Offset += TD->getTypePaddedSize(Constants.back().getType());
Offset = (Offset+AlignMask)&~AlignMask;
}
@@ -527,7 +527,7 @@ unsigned MachineConstantPool::getConstantPoolIndex(MachineConstantPoolValue *V,
unsigned Offset = 0;
if (!Constants.empty()) {
Offset = Constants.back().getOffset();
- Offset += TD->getABITypeSize(Constants.back().getType());
+ Offset += TD->getTypePaddedSize(Constants.back().getType());
Offset = (Offset+AlignMask)&~AlignMask;
}