diff options
author | Kostya Serebryany <kcc@google.com> | 2012-03-10 01:30:01 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-03-10 01:30:01 +0000 |
commit | 25c7178bf96d2316a3d9424b118d04bc51be1a9b (patch) | |
tree | 6a226ae2e8dfd56f0137ece5cbb508b6b3dc1a3b /lib/asan/asan_win.cc | |
parent | d364f87f81fda55d68a9e968bd314541c4272cde (diff) |
[asan] use O(log(N)) algorithm instead of O(N) in __asan_get_ownership
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@152467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_win.cc')
-rw-r--r-- | lib/asan/asan_win.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/asan/asan_win.cc b/lib/asan/asan_win.cc index d47ff08e9..5df110330 100644 --- a/lib/asan/asan_win.cc +++ b/lib/asan/asan_win.cc @@ -26,6 +26,10 @@ #include "asan_procmaps.h" #include "asan_thread.h" +// Should not add dependency on libstdc++, +// since most of the stuff here is inlinable. +#include <algorithm> + namespace __asan { // ---------------------- Memory management ---------------- {{{1 @@ -267,6 +271,10 @@ int Atexit(void (*function)(void)) { return atexit(function); } +void SortArray(uintptr_t *array, size_t size) { + std::sort(array, array + size); +} + } // namespace __asan #endif // _WIN32 |