@@ -56,7 +56,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
56
56
57
57
if (Size)
58
58
Result = Builder->CreateAdd (Result, ConstantInt::get (IntIdxTy, Size),
59
- GEP->getName ()+" .offs" );
59
+ GEP->getName (). str () +" .offs" );
60
60
continue ;
61
61
}
62
62
@@ -70,7 +70,7 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
70
70
Scale =
71
71
ConstantExpr::getMul (OC, Scale, false /* NUW*/ , isInBounds /* NSW*/ );
72
72
// Emit an add instruction.
73
- Result = Builder->CreateAdd (Result, Scale, GEP->getName ()+" .offs" );
73
+ Result = Builder->CreateAdd (Result, Scale, GEP->getName (). str () +" .offs" );
74
74
continue ;
75
75
}
76
76
@@ -81,16 +81,16 @@ Value *EmitGEPOffset(IRBuilderTy *Builder, const DataLayout &DL, User *GEP,
81
81
82
82
// Convert to correct type.
83
83
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" );
85
85
if (Size != 1 ) {
86
86
// We'll let instcombine(mul) convert this to a shl if possible.
87
87
Op = Builder->CreateMul (Op, ConstantInt::get (IntIdxTy, Size),
88
- GEP->getName () + " .idx" , false /* NUW*/ ,
88
+ GEP->getName (). str () + " .idx" , false /* NUW*/ ,
89
89
isInBounds /* NSW*/ );
90
90
}
91
91
92
92
// Emit an add instruction.
93
- Result = Builder->CreateAdd (Op, Result, GEP->getName ()+" .offs" );
93
+ Result = Builder->CreateAdd (Op, Result, GEP->getName (). str () +" .offs" );
94
94
}
95
95
return Result;
96
96
}
0 commit comments