diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 03:55:06 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-12 03:55:06 +0000 |
| commit | 42531260b3e0cc6256bd64911fc3db7aea59a68e (patch) | |
| tree | bb5d1b3e84331a2673079b42a25135d177d5f8e4 /llvm/lib/Support | |
| parent | 1a2cb97f7b6b0a3ad14c7f076b10a1a19834fac7 (diff) | |
| download | bcm5719-llvm-42531260b3e0cc6256bd64911fc3db7aea59a68e.tar.gz bcm5719-llvm-42531260b3e0cc6256bd64911fc3db7aea59a68e.zip | |
Use the range variant of find/find_if instead of unpacking begin/end
If the result of the find is only used to compare against end(), just
use is_contained instead.
No functionality change is intended.
llvm-svn: 278469
Diffstat (limited to 'llvm/lib/Support')
| -rw-r--r-- | llvm/lib/Support/Unix/Signals.inc | 2 | ||||
| -rw-r--r-- | llvm/lib/Support/Windows/Signals.inc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc index 117d4e8bcb5..97b8394f023 100644 --- a/llvm/lib/Support/Unix/Signals.inc +++ b/llvm/lib/Support/Unix/Signals.inc @@ -284,7 +284,7 @@ bool llvm::sys::RemoveFileOnSignal(StringRef Filename, void llvm::sys::DontRemoveFileOnSignal(StringRef Filename) { sys::SmartScopedLock<true> Guard(*SignalsMutex); std::vector<std::string>::reverse_iterator RI = - std::find(FilesToRemove->rbegin(), FilesToRemove->rend(), Filename); + find(reverse(*FilesToRemove), Filename); std::vector<std::string>::iterator I = FilesToRemove->end(); if (RI != FilesToRemove->rend()) I = FilesToRemove->erase(RI.base()-1); diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc index 1e2fa4210df..d3a70c365a4 100644 --- a/llvm/lib/Support/Windows/Signals.inc +++ b/llvm/lib/Support/Windows/Signals.inc @@ -470,7 +470,7 @@ void sys::DontRemoveFileOnSignal(StringRef Filename) { RegisterHandler(); std::vector<std::string>::reverse_iterator I = - std::find(FilesToRemove->rbegin(), FilesToRemove->rend(), Filename); + find(reverse(*FilesToRemove), Filename); if (I != FilesToRemove->rend()) FilesToRemove->erase(I.base()-1); |

