summaryrefslogtreecommitdiff
path: root/tools/bugpoint/Miscompilation.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-08 01:26:06 +0000
committerOwen Anderson <resistor@mac.com>2009-07-08 01:26:06 +0000
commit3d29df3e8a203b167d8071ea6f805b21db18a5af (patch)
tree04e35fb85689b9621ea6ec76db47849335a87c5c /tools/bugpoint/Miscompilation.cpp
parent8b8d31e3ec8c491a893307069ac123728c84782c (diff)
downloadllvm-3d29df3e8a203b167d8071ea6f805b21db18a5af.tar.gz
llvm-3d29df3e8a203b167d8071ea6f805b21db18a5af.tar.bz2
llvm-3d29df3e8a203b167d8071ea6f805b21db18a5af.tar.xz
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 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r--tools/bugpoint/Miscompilation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index b3260e1360..369f25a516 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -703,7 +703,8 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
// 1. Add a string constant with its name to the global file
Constant *InitArray = ConstantArray::get(F->getName());
GlobalVariable *funcName =
- new GlobalVariable(InitArray->getType(), true /*isConstant*/,
+ new GlobalVariable(Safe->getContext(),
+ InitArray->getType(), true /*isConstant*/,
GlobalValue::InternalLinkage, InitArray,
F->getName() + "_name", Safe);
@@ -722,7 +723,8 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
// Create a new global to hold the cached function pointer.
Constant *NullPtr = ConstantPointerNull::get(F->getType());
GlobalVariable *Cache =
- new GlobalVariable(F->getType(), false,GlobalValue::InternalLinkage,
+ new GlobalVariable(F->getParent()->getContext(),
+ F->getType(), false,GlobalValue::InternalLinkage,
NullPtr,F->getName()+".fpcache", F->getParent());
// Construct a new stub function that will re-route calls to F