diff options
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/Value.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index cbbd808475b..5e41b9f410e 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -878,7 +878,7 @@ MDNode *MDNode::intersect(MDNode *A, MDNode *B) { SmallVector<Metadata *, 4> MDs; for (Metadata *MD : A->operands()) - if (std::find(B->op_begin(), B->op_end(), MD) != B->op_end()) + if (is_contained(B->operands(), MD)) MDs.push_back(MD); // FIXME: This preserves long-standing behaviour, but is it really the right @@ -892,7 +892,7 @@ MDNode *MDNode::getMostGenericAliasScope(MDNode *A, MDNode *B) { SmallVector<Metadata *, 4> MDs(B->op_begin(), B->op_end()); for (Metadata *MD : A->operands()) - if (std::find(B->op_begin(), B->op_end(), MD) == B->op_end()) + if (!is_contained(B->operands(), MD)) MDs.push_back(MD); // FIXME: This preserves long-standing behaviour, but is it really the right diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index 6ae37fa6f15..b523497b247 100644 --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -124,10 +124,10 @@ bool Value::isUsedInBasicBlock(const BasicBlock *BB) const { const_user_iterator UI = user_begin(), UE = user_end(); for (; BI != BE && UI != UE; ++BI, ++UI) { // Scan basic block: Check if this Value is used by the instruction at BI. - if (std::find(BI->op_begin(), BI->op_end(), this) != BI->op_end()) + if (is_contained(BI->operands(), this)) return true; // Scan use list: Check if the use at UI is in BB. - const Instruction *User = dyn_cast<Instruction>(*UI); + const auto *User = dyn_cast<Instruction>(*UI); if (User && User->getParent() == BB) return true; } |