aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-09 06:26:23 +0000
committerChris Lattner <sabre@nondot.org>2008-08-09 06:26:23 +0000
commit1378c1dd22842d59ef6dd4c6c1e84cd05f63948c (patch)
tree6edb59a7037d9144982efdfb80d361221974af85
parentbe9e8ae979631fd843f36755703f98ebce502acb (diff)
Make 'Insert' set the name for Loads, instead of passing the name into the
LoadInst ctor, which causes std::string thrashing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54577 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/IRBuilder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 9c3ff61ef8..96b1850564 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/include/llvm/Support/IRBuilder.h
@@ -283,10 +283,10 @@ public:
return Insert(new FreeInst(Ptr));
}
LoadInst *CreateLoad(Value *Ptr, const char *Name = 0) {
- return Insert(new LoadInst(Ptr, Name));
+ return Insert(new LoadInst(Ptr), Name);
}
LoadInst *CreateLoad(Value *Ptr, bool isVolatile, const char *Name = 0) {
- return Insert(new LoadInst(Ptr, Name, isVolatile));
+ return Insert(new LoadInst(Ptr, 0, isVolatile), Name);
}
StoreInst *CreateStore(Value *Val, Value *Ptr, bool isVolatile = false) {
return Insert(new StoreInst(Val, Ptr, isVolatile));
@@ -306,7 +306,7 @@ public:
return ConstantExpr::getGetElementPtr(PC, &IdxBegin[0],
IdxEnd - IdxBegin);
}
- return(Insert(GetElementPtrInst::Create(Ptr, IdxBegin, IdxEnd), Name));
+ return Insert(GetElementPtrInst::Create(Ptr, IdxBegin, IdxEnd), Name);
}
Value *CreateGEP(Value *Ptr, Value *Idx, const char *Name = "") {
if (Constant *PC = dyn_cast<Constant>(Ptr))