summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.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
commit5948fdf68b5a1a68e8dbc10d28ef77473d5fc774 (patch)
treec7898711c9b1c034c981cd9d052a08ecc72f14dc /llvm/tools/bugpoint/ExtractFunction.cpp
parent5f21d2f69ab3cf891546f9f8eb13f5efa8653329 (diff)
downloadbcm5719-llvm-5948fdf68b5a1a68e8dbc10d28ef77473d5fc774.tar.gz
bcm5719-llvm-5948fdf68b5a1a68e8dbc10d28ef77473d5fc774.zip
Push LLVMContext through GlobalVariables and IRBuilder.
llvm-svn: 74985
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index e4affbb0ddc..84eb1e7f743 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -236,7 +236,8 @@ static void SplitStaticCtorDtor(const char *GlobalName, Module *M1, Module *M2,
GV->eraseFromParent();
if (!M1Tors.empty()) {
Constant *M1Init = GetTorInit(M1Tors);
- new GlobalVariable(M1Init->getType(), false, GlobalValue::AppendingLinkage,
+ new GlobalVariable(M1->getContext(), M1Init->getType(), false,
+ GlobalValue::AppendingLinkage,
M1Init, GlobalName, M1);
}
@@ -247,7 +248,8 @@ static void SplitStaticCtorDtor(const char *GlobalName, Module *M1, Module *M2,
GV->eraseFromParent();
if (!M2Tors.empty()) {
Constant *M2Init = GetTorInit(M2Tors);
- new GlobalVariable(M2Init->getType(), false, GlobalValue::AppendingLinkage,
+ new GlobalVariable(M2->getContext(), M2Init->getType(), false,
+ GlobalValue::AppendingLinkage,
M2Init, GlobalName, M2);
}
}
OpenPOWER on IntegriCloud