mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Add missing string conversions to fix a compile error in Local.h
This commit is contained in:
parent
0aa6512bc2
commit
186de7d4d3
@ -56,7 +56,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
|
||||
|
||||
if (Size)
|
||||
Result = Builder->CreateAdd(Result, ConstantInt::get(IntIdxTy, Size),
|
||||
GEP->getName()+".offs");
|
||||
GEP->getName().str()+".offs");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
|
||||
Scale =
|
||||
ConstantExpr::getMul(OC, Scale, false /*NUW*/, isInBounds /*NSW*/);
|
||||
// Emit an add instruction.
|
||||
Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs");
|
||||
Result = Builder->CreateAdd(Result, Scale, GEP->getName().str()+".offs");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -81,16 +81,16 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
|
||||
|
||||
// Convert to correct type.
|
||||
if (Op->getType() != IntIdxTy)
|
||||
Op = Builder->CreateIntCast(Op, IntIdxTy, true, Op->getName()+".c");
|
||||
Op = Builder->CreateIntCast(Op, IntIdxTy, true, Op->getName().str()+".c");
|
||||
if (Size != 1) {
|
||||
// We'll let instcombine(mul) convert this to a shl if possible.
|
||||
Op = Builder->CreateMul(Op, ConstantInt::get(IntIdxTy, Size),
|
||||
GEP->getName() + ".idx", false /*NUW*/,
|
||||
GEP->getName().str() + ".idx", false /*NUW*/,
|
||||
isInBounds /*NSW*/);
|
||||
}
|
||||
|
||||
// Emit an add instruction.
|
||||
Result = Builder->CreateAdd(Op, Result, GEP->getName()+".offs");
|
||||
Result = Builder->CreateAdd(Op, Result, GEP->getName().str()+".offs");
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user