diff options
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 5069ead391..0fe0c3ce1f 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -402,7 +402,8 @@ public: } Value *CreateGlobalString(const char *Str = "", const char *Name = "") { Constant *StrConstant = Context.getConstantArray(Str, true); - GlobalVariable *gv = new GlobalVariable(*BB->getParent()->getParent(), + Module &M = *BB->getParent()->getParent(); + GlobalVariable *gv = new GlobalVariable(M, StrConstant->getType(), true, GlobalValue::InternalLinkage, |