Skip to content

Commit

Permalink
scudo: Change the macro used to check whether we're targeting the pla…
Browse files Browse the repository at this point in the history
…tform.

Differential Revision: https://reviews.llvm.org/D78594
  • Loading branch information
pcc committed Apr 22, 2020
1 parent dc869d5 commit 3616e85
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions compiler-rt/lib/scudo/standalone/combined.h
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 3616e85

Please sign in to comment.