: GlobalValue(PointerType::get(Ty, AddressSpace),
Value::GlobalVariableVal,
OperandTraits<GlobalVariable>::op_begin(this),
- InitVal != 0, Link, Name),
+ InitVal != nullptr, Link, Name),
isConstantGlobal(constant), threadLocalMode(TLMode),
isExternallyInitializedConstant(isExternallyInitialized) {
if (InitVal) {
: GlobalValue(PointerType::get(Ty, AddressSpace),
Value::GlobalVariableVal,
OperandTraits<GlobalVariable>::op_begin(this),
- InitVal != 0, Link, Name),
+ InitVal != nullptr, Link, Name),
isConstantGlobal(constant), threadLocalMode(TLMode),
isExternallyInitializedConstant(isExternallyInitialized) {
if (InitVal) {
}
void GlobalVariable::setInitializer(Constant *InitVal) {
- if (InitVal == 0) {
+ if (!InitVal) {
if (hasInitializer()) {
- Op<0>().set(0);
+ Op<0>().set(nullptr);
NumOperands = 0;
}
} else {
for (;;) {
GlobalValue *GV = getAliaseeGV(GA);
if (!Visited.insert(GV))
- return 0;
+ return nullptr;
// Iterate over aliasing chain.
GA = dyn_cast<GlobalAlias>(GV);