Always pass in an alignment.

llvm-svn: 26070
This commit is contained in:
Chris Lattner 2006-02-09 02:19:16 +00:00
parent d94a3d2c8a
commit 832d78d981
1 changed files with 2 additions and 1 deletions

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;