summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/Metadata.h1
-rw-r--r--llvm/include/llvm/IR/TrackingMDRef.h2
-rw-r--r--llvm/lib/IR/DebugInfo.cpp2
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");
}
}
OpenPOWER on IntegriCloud