diff options
author | Hans Wennborg <hans@hanshq.net> | 2014-12-09 20:39:15 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2014-12-09 20:39:15 +0000 |
commit | e242e8b06431da9232f444373c9601843b5a57db (patch) | |
tree | 66d55d79df82094c26c9ad801adfe4a5de4a60fa | |
parent | b030c254c05cfc7f8f0d681fd541cee9ad21f8f5 (diff) | |
download | bcm5719-llvm-e242e8b06431da9232f444373c9601843b5a57db.tar.gz bcm5719-llvm-e242e8b06431da9232f444373c9601843b5a57db.zip |
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
-rw-r--r-- | llvm/include/llvm/IR/Metadata.h | 1 | ||||
-rw-r--r-- | llvm/include/llvm/IR/TrackingMDRef.h | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 2 |
3 files changed, 1 insertions, 4 deletions
diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h index 56699b0fc4d..81107e69806 100644 --- a/llvm/include/llvm/IR/Metadata.h +++ b/llvm/include/llvm/IR/Metadata.h @@ -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(); } diff --git a/llvm/include/llvm/IR/TrackingMDRef.h b/llvm/include/llvm/IR/TrackingMDRef.h index 6e1b1bd1510..ea621c1d95e 100644 --- a/llvm/include/llvm/IR/TrackingMDRef.h +++ b/llvm/include/llvm/IR/TrackingMDRef.h @@ -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(); } diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index c31cd6dd915..c99d885a668 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -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"); } } |