From fcd8dafd8e5d580d44033bef5c52bdc8f8609d4d Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Thu, 9 Jul 2009 00:52:44 +0000 Subject: Work around an ICE in gcc-4.2.4. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75084 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/IRBuilder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/llvm/Support/IRBuilder.h') diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 5069ead..0fe0c3c 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, -- cgit v1.1