diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-08 19:03:57 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-08 19:03:57 +0000 |
commit | b17f32945fa6dd8e552a16cc5273bba5805cf4e4 (patch) | |
tree | b8383165ab804187660d5c8eddb2dc7486730b93 /llvm/lib/Transforms/Utils/CloneModule.cpp | |
parent | d5ffa8ffb62df34c6fa3ba8ec4c29b2ea2891ad0 (diff) | |
download | bcm5719-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/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp index afebd5bd5d1..bb5f3e6f6eb 100644 --- a/llvm/lib/Transforms/Utils/CloneModule.cpp +++ b/llvm/lib/Transforms/Utils/CloneModule.cpp @@ -56,11 +56,11 @@ Module *llvm::CloneModule(const Module *M, // for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) { - GlobalVariable *GV = new GlobalVariable(M->getContext(), + GlobalVariable *GV = new GlobalVariable(*New, I->getType()->getElementType(), false, GlobalValue::ExternalLinkage, 0, - I->getName(), New); + I->getName()); GV->setAlignment(I->getAlignment()); ValueMap[I] = GV; } |