From b7eb8e35e481a74962664b63dfb09483b200209a Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 2 Aug 2018 17:32:43 +0000 Subject: Vendor import of llvm trunk r338536: https://llvm.org/svn/llvm-project/llvm/trunk@338536 --- lib/Transforms/Utils/CloneModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Transforms/Utils/CloneModule.cpp') diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index 35c7511a24b9..c7d68bab8170 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -61,7 +61,7 @@ std::unique_ptr llvm::CloneModule( // for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) { - GlobalVariable *GV = new GlobalVariable(*New, + GlobalVariable *GV = new GlobalVariable(*New, I->getValueType(), I->isConstant(), I->getLinkage(), (Constant*) nullptr, I->getName(), @@ -110,7 +110,7 @@ std::unique_ptr llvm::CloneModule( GA->copyAttributesFrom(&*I); VMap[&*I] = GA; } - + // Now that all of the things that global variable initializer can refer to // have been created, loop through and copy the global variable referrers // over... We also set the attributes on the global now. -- cgit v1.2.3