From e07a8b5efd60f25de84ac89783a5e326dc414cef Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 23 Jun 2020 13:36:06 -0700 Subject: [PATCH] Add missing string conversions to fix a compile error in Local.h --- llvm/include/llvm/Analysis/Utils/Local.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/Analysis/Utils/Local.h b/llvm/include/llvm/Analysis/Utils/Local.h index c21be2301ab1..e7ed45da1f75 100644 --- a/llvm/include/llvm/Analysis/Utils/Local.h +++ b/llvm/include/llvm/Analysis/Utils/Local.h @@ -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; }