Implement AsanProcMaps for Mac OS. The code from sysinfo/ is not needed anymore and should be cleaned up.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@148385 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
index 2971290..ae45b82 100644
--- a/lib/asan/asan_linux.cc
+++ b/lib/asan/asan_linux.cc
@@ -220,17 +220,7 @@
 bool AsanProcMaps::GetObjectNameAndOffset(uintptr_t addr, uintptr_t *offset,
                                           char filename[],
                                           size_t filename_size) {
-  AsanProcMaps proc_maps;
-  uintptr_t start, end, file_offset;
-  while (proc_maps.Next(&start, &end, &file_offset, filename, filename_size)) {
-    if (addr >= start && addr < end) {
-      *offset = (addr - start) + file_offset;
-      return true;
-    }
-  }
-  if (filename_size)
-    filename[0] = '\0';
-  return false;
+  return IterateForObjectNameAndOffset(addr, offset, filename, filename_size);
 }
 
 #else  // __arm__