diff options
| -rw-r--r-- | compiler-rt/lib/asan/asan_mac.cc | 1 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/asan_procmaps.h | 11 |
2 files changed, 4 insertions, 8 deletions
diff --git a/compiler-rt/lib/asan/asan_mac.cc b/compiler-rt/lib/asan/asan_mac.cc index 18faaf15258..0d5d25c5afd 100644 --- a/compiler-rt/lib/asan/asan_mac.cc +++ b/compiler-rt/lib/asan/asan_mac.cc @@ -24,6 +24,7 @@ #include <crt_externs.h> // for _NSGetEnviron #include <mach-o/dyld.h> +#include <mach-o/loader.h> #include <sys/mman.h> #include <sys/resource.h> #include <sys/ucontext.h> diff --git a/compiler-rt/lib/asan/asan_procmaps.h b/compiler-rt/lib/asan/asan_procmaps.h index 10776560d30..6dd42f9f653 100644 --- a/compiler-rt/lib/asan/asan_procmaps.h +++ b/compiler-rt/lib/asan/asan_procmaps.h @@ -15,9 +15,6 @@ #define ASAN_PROCMAPS_H #include "asan_internal.h" -#if defined __APPLE__ -#include <mach-o/loader.h> -#endif namespace __asan { @@ -33,11 +30,6 @@ class AsanProcMaps { char filename[], size_t filename_size); ~AsanProcMaps(); private: -#if defined __APPLE__ - template<uint32_t kLCSegment, typename SegmentCommand> - bool NextSegmentLoad(uintptr_t *start, uintptr_t *end, uintptr_t *offset, - char filename[], size_t filename_size); -#endif // Default implementation of GetObjectNameAndOffset. // Quite slow, because it iterates through the whole process map for each // lookup. @@ -63,6 +55,9 @@ class AsanProcMaps { size_t proc_self_maps_buff_len_; char *current_; #elif defined __APPLE__ + template<uint32_t kLCSegment, typename SegmentCommand> + bool NextSegmentLoad(uintptr_t *start, uintptr_t *end, uintptr_t *offset, + char filename[], size_t filename_size); int current_image_; uint32_t current_magic_; int current_load_cmd_count_; |

