1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[MCA, ExecutionEngine, Object] Use llvm::is_contained (NFC)

This commit is contained in:
Kazu Hirata 2020-12-18 09:09:04 -08:00
parent afe3fa52eb
commit 7b36fe3c9b
3 changed files with 5 additions and 6 deletions

View File

@ -267,9 +267,9 @@ public:
// This routine performs a sanity check. This routine should only be called
// when we know that 'IR' is not in the scheduler's instruction queues.
void sanityCheck(const InstRef &IR) const {
assert(find(WaitSet, IR) == WaitSet.end() && "Already in the wait set!");
assert(find(ReadySet, IR) == ReadySet.end() && "Already in the ready set!");
assert(find(IssuedSet, IR) == IssuedSet.end() && "Already executing!");
assert(!is_contained(WaitSet, IR) && "Already in the wait set!");
assert(!is_contained(ReadySet, IR) && "Already in the ready set!");
assert(!is_contained(IssuedSet, IR) && "Already executing!");
}
#endif // !NDEBUG
};

View File

@ -167,8 +167,7 @@ void RTDyldObjectLinkingLayer::emit(
void RTDyldObjectLinkingLayer::registerJITEventListener(JITEventListener &L) {
std::lock_guard<std::mutex> Lock(RTDyldLayerMutex);
assert(llvm::none_of(EventListeners,
[&](JITEventListener *O) { return O == &L; }) &&
assert(!llvm::is_contained(EventListeners, &L) &&
"Listener has already been registered");
EventListeners.push_back(&L);
}

View File

@ -2743,7 +2743,7 @@ Triple MachOObjectFile::getHostArch() {
bool MachOObjectFile::isValidArch(StringRef ArchFlag) {
auto validArchs = getValidArchs();
return llvm::find(validArchs, ArchFlag) != validArchs.end();
return llvm::is_contained(validArchs, ArchFlag);
}
ArrayRef<StringRef> MachOObjectFile::getValidArchs() {