diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-08 01:26:06 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-08 01:26:06 +0000 |
commit | 3d29df3e8a203b167d8071ea6f805b21db18a5af (patch) | |
tree | 04e35fb85689b9621ea6ec76db47849335a87c5c /lib/Transforms/Utils/LowerInvoke.cpp | |
parent | 8b8d31e3ec8c491a893307069ac123728c84782c (diff) |
Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 8a585d2283..1eefdc4b3c 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -139,7 +139,8 @@ bool LowerInvoke::doInitialization(Module &M) { // Now that we've done that, insert the jmpbuf list head global, unless it // already exists. if (!(JBListHead = M.getGlobalVariable("llvm.sjljeh.jblist", PtrJBList))) { - JBListHead = new GlobalVariable(PtrJBList, false, + JBListHead = new GlobalVariable(M.getContext(), + PtrJBList, false, GlobalValue::LinkOnceAnyLinkage, Context->getNullValue(PtrJBList), "llvm.sjljeh.jblist", &M); @@ -182,7 +183,8 @@ void LowerInvoke::createAbortMessage(Module *M) { Context->getConstantArray("ERROR: Exception thrown, but not caught!\n"); AbortMessageLength = Msg->getNumOperands()-1; // don't include \0 - GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true, + GlobalVariable *MsgGV = new GlobalVariable(M->getContext(), + Msg->getType(), true, GlobalValue::InternalLinkage, Msg, "abortmsg", M); std::vector<Constant*> GEPIdx(2, Context->getNullValue(Type::Int32Ty)); @@ -195,7 +197,8 @@ void LowerInvoke::createAbortMessage(Module *M) { "Recompile program with -enable-correct-eh-support.\n"); AbortMessageLength = Msg->getNumOperands()-1; // don't include \0 - GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true, + GlobalVariable *MsgGV = new GlobalVariable(M->getContext(), + Msg->getType(), true, GlobalValue::InternalLinkage, Msg, "abortmsg", M); std::vector<Constant*> GEPIdx(2, Context->getNullValue(Type::Int32Ty)); |