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:
parent
afe3fa52eb
commit
7b36fe3c9b
@ -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
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user