[compiler-rt] 3616e85 - scudo: Change the macro used to check whether we're targeting the platform.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 10:33:10 PDT 2020


Author: Peter Collingbourne
Date: 2020-04-22T10:32:51-07:00
New Revision: 3616e851f66e41b3c8b9f97d26e711069d56e752

URL: https://github.com/llvm/llvm-project/commit/3616e851f66e41b3c8b9f97d26e711069d56e752
DIFF: https://github.com/llvm/llvm-project/commit/3616e851f66e41b3c8b9f97d26e711069d56e752.diff

LOG: scudo: Change the macro used to check whether we're targeting the platform.

Differential Revision: https://reviews.llvm.org/D78594

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/combined.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index 51e0c5d1966c..b44753a4373a 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -32,10 +32,9 @@
 
 extern "C" inline void EmptyCallback() {}
 
-#if SCUDO_ANDROID && __ANDROID_API__ == 10000
+#ifdef HAVE_ANDROID_UNSAFE_FRAME_POINTER_CHASE
 // This function is not part of the NDK so it does not appear in any public
-// header files. We only declare/use it when targeting the platform (i.e. API
-// level 10000).
+// header files. We only declare/use it when targeting the platform.
 extern "C" size_t android_unsafe_frame_pointer_chase(scudo::uptr *buf,
                                                      size_t num_entries);
 #endif
@@ -232,7 +231,7 @@ class Allocator {
   }
 
   NOINLINE u32 collectStackTrace() {
-#if SCUDO_ANDROID && __ANDROID_API__ == 10000
+#ifdef HAVE_ANDROID_UNSAFE_FRAME_POINTER_CHASE
     // Discard collectStackTrace() frame and allocator function frame.
     constexpr uptr DiscardFrames = 2;
     uptr Stack[MaxTraceSize + DiscardFrames];


        


More information about the llvm-commits mailing list