forked from OSchip/llvm-project
[IR] Use llvm::is_contained (NFC)
This commit is contained in:
parent
1b6d879ec1
commit
70de324046
|
@ -641,10 +641,7 @@ void MDNode::resolveCycles() {
|
|||
}
|
||||
|
||||
static bool hasSelfReference(MDNode *N) {
|
||||
for (Metadata *MD : N->operands())
|
||||
if (MD == N)
|
||||
return true;
|
||||
return false;
|
||||
return llvm::is_contained(N->operands(), N);
|
||||
}
|
||||
|
||||
MDNode *MDNode::replaceWithPermanentImpl() {
|
||||
|
|
|
@ -55,11 +55,7 @@ bool llvm::shouldPrintAfterSomePass() {
|
|||
|
||||
static bool shouldPrintBeforeOrAfterPass(StringRef PassID,
|
||||
ArrayRef<std::string> PassesToPrint) {
|
||||
for (auto &Pass : PassesToPrint) {
|
||||
if (Pass == PassID)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return llvm::is_contained(PassesToPrint, PassID);
|
||||
}
|
||||
|
||||
bool llvm::shouldPrintBeforeAll() { return PrintBeforeAll; }
|
||||
|
|
Loading…
Reference in New Issue