[llvm] r223824 - Try fixing MSVC build after r223802
Hans Wennborg
hans at hanshq.net
Tue Dec 9 12:39:15 PST 2014
Author: hans
Date: Tue Dec 9 14:39:15 2014
New Revision: 223824
URL: http://llvm.org/viewvc/llvm-project?rev=223824&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/IR/Metadata.h
llvm/trunk/include/llvm/IR/TrackingMDRef.h
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/IR/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Metadata.h?rev=223824&r1=223823&r2=223824&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Metadata.h (original)
+++ llvm/trunk/include/llvm/IR/Metadata.h Tue Dec 9 14:39:15 2014
@@ -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(); }
Modified: llvm/trunk/include/llvm/IR/TrackingMDRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/TrackingMDRef.h?rev=223824&r1=223823&r2=223824&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/TrackingMDRef.h (original)
+++ llvm/trunk/include/llvm/IR/TrackingMDRef.h Tue Dec 9 14:39:15 2014
@@ -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(); }
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=223824&r1=223823&r2=223824&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Tue Dec 9 14:39:15 2014
@@ -662,7 +662,7 @@ static void VerifySubsetOf(const MDNode
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");
}
}
More information about the llvm-commits
mailing list