aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-06-23 12:14:23 +0000
committerHans Wennborg <hans@hanshq.net>2012-06-23 12:14:23 +0000
commit6de8ffbbc91bd750fa7212d3cbc4211341ef817e (patch)
treeb88a4caf850b9cfbbebcc907d0758c4d89946a6a /lib/VMCore
parentce718ff9f42c7da092eaa01dd0242e8d5ba84713 (diff)
downloadexternal_llvm-6de8ffbbc91bd750fa7212d3cbc4211341ef817e.zip
external_llvm-6de8ffbbc91bd750fa7212d3cbc4211341ef817e.tar.gz
external_llvm-6de8ffbbc91bd750fa7212d3cbc4211341ef817e.tar.bz2
Clean-up after r159077.
Remove temporary GlobalVariable constructors now that Clang has been updated (r159078). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Globals.cpp47
1 files changed, 1 insertions, 46 deletions
diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp
index a34ea70..c428b88 100644
--- a/lib/VMCore/Globals.cpp
+++ b/lib/VMCore/Globals.cpp
@@ -80,51 +80,6 @@ bool GlobalValue::isDeclaration() const {
// GlobalVariable Implementation
//===----------------------------------------------------------------------===//
-// TODO: Remove once clang is updated.
-GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link,
- Constant *InitVal, const Twine &Name,
- bool ThreadLocal, unsigned AddressSpace)
- : GlobalValue(PointerType::get(Ty, AddressSpace),
- Value::GlobalVariableVal,
- OperandTraits<GlobalVariable>::op_begin(this),
- InitVal != 0, Link, Name),
- isConstantGlobal(constant),
- threadLocalMode(ThreadLocal ? GeneralDynamicTLSModel : NotThreadLocal) {
- if (InitVal) {
- assert(InitVal->getType() == Ty &&
- "Initializer should be the same type as the GlobalVariable!");
- Op<0>() = InitVal;
- }
-
- LeakDetector::addGarbageObject(this);
-}
-
-// TODO: Remove once clang is updated.
-GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
- LinkageTypes Link, Constant *InitVal,
- const Twine &Name,
- GlobalVariable *Before, bool ThreadLocal,
- unsigned AddressSpace)
- : GlobalValue(PointerType::get(Ty, AddressSpace),
- Value::GlobalVariableVal,
- OperandTraits<GlobalVariable>::op_begin(this),
- InitVal != 0, Link, Name),
- isConstantGlobal(constant),
- threadLocalMode(ThreadLocal ? GeneralDynamicTLSModel : NotThreadLocal) {
- if (InitVal) {
- assert(InitVal->getType() == Ty &&
- "Initializer should be the same type as the GlobalVariable!");
- Op<0>() = InitVal;
- }
-
- LeakDetector::addGarbageObject(this);
-
- if (Before)
- Before->getParent()->getGlobalList().insert(Before, this);
- else
- M.getGlobalList().push_back(this);
-}
-
GlobalVariable::GlobalVariable(Type *Ty, bool constant, LinkageTypes Link,
Constant *InitVal, const Twine &Name,
ThreadLocalMode TLMode, unsigned AddressSpace)
@@ -147,7 +102,7 @@ GlobalVariable::GlobalVariable(Module &M, Type *Ty, bool constant,
const Twine &Name,
GlobalVariable *Before, ThreadLocalMode TLMode,
unsigned AddressSpace)
- : GlobalValue(PointerType::get(Ty, AddressSpace),
+ : GlobalValue(PointerType::get(Ty, AddressSpace),
Value::GlobalVariableVal,
OperandTraits<GlobalVariable>::op_begin(this),
InitVal != 0, Link, Name),