1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Fix two FIXMEs.

llvm-svn: 90089
This commit is contained in:
Benjamin Kramer 2009-11-29 20:29:30 +00:00
parent 2c7105b098
commit a1d24b5a8d

View File

@ -1480,8 +1480,7 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, uint64_t Offset) {
if (StoreInst *SI = dyn_cast<StoreInst>(User)) { if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
assert(SI->getOperand(0) != Ptr && "Consistency error!"); assert(SI->getOperand(0) != Ptr && "Consistency error!");
// FIXME: Remove once builder has Twine API. Value *Old = Builder.CreateLoad(NewAI, NewAI->getName() + ".in");
Value *Old = Builder.CreateLoad(NewAI, (NewAI->getName()+".in").str().c_str());
Value *New = ConvertScalar_InsertValue(SI->getOperand(0), Old, Offset, Value *New = ConvertScalar_InsertValue(SI->getOperand(0), Old, Offset,
Builder); Builder);
Builder.CreateStore(New, NewAI); Builder.CreateStore(New, NewAI);
@ -1504,9 +1503,8 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, uint64_t Offset) {
if (Val) if (Val)
for (unsigned i = 1; i != NumBytes; ++i) for (unsigned i = 1; i != NumBytes; ++i)
APVal |= APVal << 8; APVal |= APVal << 8;
// FIXME: Remove once builder has Twine API. Value *Old = Builder.CreateLoad(NewAI, NewAI->getName() + ".in");
Value *Old = Builder.CreateLoad(NewAI, (NewAI->getName()+".in").str().c_str());
Value *New = ConvertScalar_InsertValue( Value *New = ConvertScalar_InsertValue(
ConstantInt::get(User->getContext(), APVal), ConstantInt::get(User->getContext(), APVal),
Old, Offset, Builder); Old, Offset, Builder);