1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Clean-up after r159077.

Remove temporary GlobalVariable constructors now that Clang has been
updated (r159078).

llvm-svn: 159079
This commit is contained in:
Hans Wennborg 2012-06-23 12:14:23 +00:00
parent 8c011bd43a
commit bdb7ec3dc8
2 changed files with 8 additions and 65 deletions

View File

@ -58,30 +58,18 @@ public:
LocalExecTLSModel
};
// TODO: Remove these once Clang is updated.
/// GlobalVariable ctor - If a parent module is specified, the global is
/// automatically inserted into the end of the specified modules global list.
GlobalVariable(Type *Ty, bool isConstant, LinkageTypes Linkage,
Constant *Initializer = 0, const Twine &Name = "",
bool ThreadLocal = false, unsigned AddressSpace = 0);
ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0);
/// GlobalVariable ctor - This creates a global and inserts it before the
/// specified other global.
GlobalVariable(Module &M, Type *Ty, bool isConstant,
LinkageTypes Linkage, Constant *Initializer,
const Twine &Name = "",
GlobalVariable *InsertBefore = 0, bool ThreadLocal = false,
unsigned AddressSpace = 0);
/// GlobalVariable ctor - If a parent module is specified, the global is
/// automatically inserted into the end of the specified modules global list.
// TODO: Put default param values back when ctors above are removed.
GlobalVariable(Type *Ty, bool isConstant, LinkageTypes Linkage,
Constant *Initializer, const Twine &Name,
ThreadLocalMode, unsigned AddressSpace = 0);
/// GlobalVariable ctor - This creates a global and inserts it before the
/// specified other global.
// TODO: Put default param values back when ctors above are removed.
GlobalVariable(Module &M, Type *Ty, bool isConstant,
LinkageTypes Linkage, Constant *Initializer,
const Twine &Name,
GlobalVariable *InsertBefore,
ThreadLocalMode,
GlobalVariable *InsertBefore = 0,
ThreadLocalMode = NotThreadLocal,
unsigned AddressSpace = 0);
~GlobalVariable() {

View File

@ -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)