diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt index e2f39f224df9c..e47acbec3c6f0 100644 --- a/compiler-rt/lib/asan/CMakeLists.txt +++ b/compiler-rt/lib/asan/CMakeLists.txt @@ -13,10 +13,9 @@ set(ASAN_SOURCES asan_globals_win.cpp asan_interceptors.cpp asan_interceptors_memintrinsics.cpp - asan_linux.cpp asan_mac.cpp - asan_malloc_linux.cpp asan_malloc_mac.cpp + asan_malloc_unix.cpp asan_malloc_win.cpp asan_memory_profile.cpp asan_poisoning.cpp @@ -29,6 +28,7 @@ set(ASAN_SOURCES asan_stats.cpp asan_suppressions.cpp asan_thread.cpp + asan_unix.cpp asan_win.cpp ) diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cpp b/compiler-rt/lib/asan/asan_malloc_unix.cpp similarity index 98% rename from compiler-rt/lib/asan/asan_malloc_linux.cpp rename to compiler-rt/lib/asan/asan_malloc_unix.cpp index 3d6b03fefab70..c9c48cb443b9b 100644 --- a/compiler-rt/lib/asan/asan_malloc_linux.cpp +++ b/compiler-rt/lib/asan/asan_malloc_unix.cpp @@ -1,4 +1,4 @@ -//===-- asan_malloc_linux.cpp ---------------------------------------------===// +//===-- asan_malloc_unix.cpp ----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -8,7 +8,7 @@ // // This file is a part of AddressSanitizer, an address sanity checker. // -// Linux-specific malloc interception. +// Unix-like-specific malloc interception. // We simply define functions like malloc, free, realloc, etc. // They will replace the corresponding libc functions automagically. //===----------------------------------------------------------------------===// diff --git a/compiler-rt/lib/asan/asan_linux.cpp b/compiler-rt/lib/asan/asan_unix.cpp similarity index 99% rename from compiler-rt/lib/asan/asan_linux.cpp rename to compiler-rt/lib/asan/asan_unix.cpp index 01cf46dc2fa7d..527bb7e92c2f1 100644 --- a/compiler-rt/lib/asan/asan_linux.cpp +++ b/compiler-rt/lib/asan/asan_unix.cpp @@ -1,4 +1,4 @@ -//===-- asan_linux.cpp ----------------------------------------------------===// +//===-- asan_unix.cpp -----------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn index 42467c21aa24c..c79251666f2e8 100644 --- a/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn @@ -33,10 +33,9 @@ if (current_toolchain == host_toolchain) { "asan_interface.inc", "asan_interface_internal.h", "asan_internal.h", - "asan_linux.cpp", "asan_mac.cpp", - "asan_malloc_linux.cpp", "asan_malloc_mac.cpp", + "asan_malloc_unix.cpp", "asan_malloc_win.cpp", "asan_mapping.h", "asan_memory_profile.cpp", @@ -58,6 +57,7 @@ if (current_toolchain == host_toolchain) { "asan_suppressions.h", "asan_thread.cpp", "asan_thread.h", + "asan_unix.cpp", "asan_win.cpp", ] if (current_os != "mac" && current_os != "win") {