Try fixing MSVC build after r223802

LLVM_EXPLICIT is only supported by recent version of MSVC, and it seems
the not-so-recent versions get confused about the operator bool() when
tryint to resolve operator== calls.

This removed the operator bool()'s since they don't seem to be used
anyway.

llvm-svn: 223824
This commit is contained in:
Hans Wennborg 2014-12-09 20:39:15 +00:00
parent b030c254c0
commit e242e8b064
3 changed files with 1 additions and 4 deletions

View File

@ -525,7 +525,6 @@ public:
MDOperand() : MD(nullptr) {}
~MDOperand() { untrack(); }
LLVM_EXPLICIT operator bool() const { return get(); }
Metadata *get() const { return MD; }
operator Metadata *() const { return get(); }
Metadata *operator->() const { return get(); }

View File

@ -55,7 +55,6 @@ public:
}
~TrackingMDRef() { untrack(); }
LLVM_EXPLICIT operator bool() const { return get(); }
Metadata *get() const { return MD; }
operator Metadata *() const { return get(); }
Metadata *operator->() const { return get(); }
@ -121,7 +120,6 @@ public:
return *this;
}
LLVM_EXPLICIT operator bool() const { return get(); }
T *get() const { return (T *)Ref.get(); }
operator T *() const { return get(); }
T *operator->() const { return get(); }

View File

@ -662,7 +662,7 @@ static void VerifySubsetOf(const MDNode *LHS, const MDNode *RHS) {
const MDNode *E = cast<MDNode>(LHS->getOperand(i));
bool found = false;
for (unsigned j = 0; !found && j != RHS->getNumOperands(); ++j)
found = E == RHS->getOperand(j);
found = (E == cast<MDNode>(RHS->getOperand(j)));
assert(found && "Losing a member during member list replacement");
}
}