Always pass in an alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-02-09 02:19:16 +00:00
parent 23c574a841
commit 5ac38d147b

View File

@ -1139,7 +1139,8 @@ void CreateCodeToLoadConst(const TargetMachine& target, Function* F,
// Get the constant pool index for this constant
MachineConstantPool *CP = MachineFunction::get(F).getConstantPool();
Constant *C = cast<Constant>(val);
unsigned CPI = CP->getConstantPoolIndex(C);
unsigned Align = target.getTargetData().getTypeAlignmentShift(C->getType());
unsigned CPI = CP->getConstantPoolIndex(C, Align);
// Put the address of the constant into a register
MachineInstr* MI;