[llvm-commits] [ASan] Move the _ReturnAddress definition out of the __asan:: namespace (issue 5643056)

timurrrr at google.com timurrrr at google.com
Wed Feb 8 06:11:57 PST 2012


Reviewers: glider,

Message:
Hi Alexander,

Can you please review this small patch?

Thanks,
Timur



Please review this at http://codereview.appspot.com/5643056/

Affected files:
   M lib/asan/asan_internal.h


Index: lib/asan/asan_internal.h
diff --git a/lib/asan/asan_internal.h b/lib/asan/asan_internal.h
index  
fa503795347b1a1250d4ddbe3f01b159ca7bb753..54556a29ad887d1b955d307076d1e2957e8c6df6  
100644
--- a/lib/asan/asan_internal.h
+++ b/lib/asan/asan_internal.h
@@ -31,6 +31,9 @@ typedef __int16          int16_t;
  typedef __int32          int32_t;
  typedef __int64          int64_t;

+extern "C" void* _ReturnAddress(void);
+# pragma intrinsic(_ReturnAddress)
+
  # define ALIAS(x)   // TODO(timurrrr): do we need this on Windows?
  # define ALIGNED(x) __declspec(align(x))
  # define NOINLINE __declspec(noinline)
@@ -215,8 +218,6 @@ const size_t kPageSize = 1UL << kPageSizeBits;
  # define GET_CALLER_PC() (uintptr_t)__builtin_return_address(0)
  # define GET_CURRENT_FRAME() (uintptr_t)__builtin_frame_address(0)
  #else
-extern "C" void* _ReturnAddress(void);
-# pragma intrinsic(_ReturnAddress)
  # define GET_CALLER_PC() (uintptr_t)_ReturnAddress()
  // CaptureStackBackTrace doesn't need to know BP on Windows.
  // FIXME: This macro is still used when printing error reports though it's  
not





More information about the llvm-commits mailing list