summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11fa900)
raw | patch | inline | side by side (parent: 11fa900)
author | Hans Wennborg <hans@hanshq.net> | |
Tue, 9 Dec 2014 20:39:15 +0000 (20:39 +0000) | ||
committer | Hans Wennborg <hans@hanshq.net> | |
Tue, 9 Dec 2014 20:39:15 +0000 (20:39 +0000) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223824 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223824 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Metadata.h | patch | blob | history | |
include/llvm/IR/TrackingMDRef.h | patch | blob | history | |
lib/IR/DebugInfo.cpp | patch | blob | history |
index 56699b0fc4d21ce31d63dbb08364457e3a138011..81107e6980670991d0d995fe32f5273c7cdbf690 100644 (file)
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(); }
index 6e1b1bd151046e1683f71381ba6cb9fb6e5817ab..ea621c1d95e83393aedc8f9c6d6bd8da36ff4984 100644 (file)
}
~TrackingMDRef() { untrack(); }
- LLVM_EXPLICIT operator bool() const { return get(); }
Metadata *get() const { return MD; }
operator Metadata *() const { return get(); }
Metadata *operator->() const { return get(); }
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/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index c31cd6dd915328d5c1e736d3f7842974c49b52cb..c99d885a6682e49c4b73539848b2392b293f562f 100644 (file)
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
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");
}
}