summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-08 19:03:57 +0000
committerOwen Anderson <resistor@mac.com>2009-07-08 19:03:57 +0000
commitb17f32945fa6dd8e552a16cc5273bba5805cf4e4 (patch)
treeb8383165ab804187660d5c8eddb2dc7486730b93 /llvm/tools/bugpoint/ExtractFunction.cpp
parentd5ffa8ffb62df34c6fa3ba8ec4c29b2ea2891ad0 (diff)
downloadbcm5719-llvm-b17f32945fa6dd8e552a16cc5273bba5805cf4e4.tar.gz
bcm5719-llvm-b17f32945fa6dd8e552a16cc5273bba5805cf4e4.zip
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 84eb1e7f743..6cd2d19b4f3 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -236,9 +236,9 @@ static void SplitStaticCtorDtor(const char *GlobalName, Module *M1, Module *M2,
GV->eraseFromParent();
if (!M1Tors.empty()) {
Constant *M1Init = GetTorInit(M1Tors);
- new GlobalVariable(M1->getContext(), M1Init->getType(), false,
+ new GlobalVariable(*M1, M1Init->getType(), false,
GlobalValue::AppendingLinkage,
- M1Init, GlobalName, M1);
+ M1Init, GlobalName);
}
GV = M2->getNamedGlobal(GlobalName);
@@ -248,9 +248,9 @@ static void SplitStaticCtorDtor(const char *GlobalName, Module *M1, Module *M2,
GV->eraseFromParent();
if (!M2Tors.empty()) {
Constant *M2Init = GetTorInit(M2Tors);
- new GlobalVariable(M2->getContext(), M2Init->getType(), false,
+ new GlobalVariable(*M2, M2Init->getType(), false,
GlobalValue::AppendingLinkage,
- M2Init, GlobalName, M2);
+ M2Init, GlobalName);
}
}
OpenPOWER on IntegriCloud