[llvm] e07a8b5 - Add missing string conversions to fix a compile error in Local.h
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 13:37:08 PDT 2020
Author: Adrian Prantl
Date: 2020-06-23T13:36:56-07:00
New Revision: e07a8b5efd60f25de84ac89783a5e326dc414cef
URL: https://github.com/llvm/llvm-project/commit/e07a8b5efd60f25de84ac89783a5e326dc414cef
DIFF: https://github.com/llvm/llvm-project/commit/e07a8b5efd60f25de84ac89783a5e326dc414cef.diff
LOG: Add missing string conversions to fix a compile error in Local.h
Added:
Modified:
llvm/include/llvm/Analysis/Utils/Local.h
Removed:
################################################################################
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;
}
More information about the llvm-commits
mailing list