Skip to content

Commit e07a8b5

Browse files
committed
Add missing string conversions to fix a compile error in Local.h
1 parent 47fb21d commit e07a8b5

File tree

1 file changed

+5
-5
lines changed
  • llvm/include/llvm/Analysis/Utils

1 file changed

+5
-5
lines changed

llvm/include/llvm/Analysis/Utils/Local.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
5656

5757
if (Size)
5858
Result = Builder->CreateAdd(Result, ConstantInt::get(IntIdxTy, Size),
59-
GEP->getName()+".offs");
59+
GEP->getName().str()+".offs");
6060
continue;
6161
}
6262

@@ -70,7 +70,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
7070
Scale =
7171
ConstantExpr::getMul(OC, Scale, false /*NUW*/, isInBounds /*NSW*/);
7272
// Emit an add instruction.
73-
Result = Builder->CreateAdd(Result, Scale, GEP->getName()+".offs");
73+
Result = Builder->CreateAdd(Result, Scale, GEP->getName().str()+".offs");
7474
continue;
7575
}
7676

@@ -81,16 +81,16 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
8181

8282
// Convert to correct type.
8383
if (Op->getType() != IntIdxTy)
84-
Op = Builder->CreateIntCast(Op, IntIdxTy, true, Op->getName()+".c");
84+
Op = Builder->CreateIntCast(Op, IntIdxTy, true, Op->getName().str()+".c");
8585
if (Size != 1) {
8686
// We'll let instcombine(mul) convert this to a shl if possible.
8787
Op = Builder->CreateMul(Op, ConstantInt::get(IntIdxTy, Size),
88-
GEP->getName() + ".idx", false /*NUW*/,
88+
GEP->getName().str() + ".idx", false /*NUW*/,
8989
isInBounds /*NSW*/);
9090
}
9191

9292
// Emit an add instruction.
93-
Result = Builder->CreateAdd(Op, Result, GEP->getName()+".offs");
93+
Result = Builder->CreateAdd(Op, Result, GEP->getName().str()+".offs");
9494
}
9595
return Result;
9696
}

0 commit comments

Comments
 (0)