Add missing string conversions to fix a compile error in Local.h

This commit is contained in:
Adrian Prantl 2020-06-23 13:36:06 -07:00
parent 47fb21d2ea
commit e07a8b5efd
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}