forked from OSchip/llvm-project
Fix ALIGNED misuse in asan_thread.cc (built on all platforms); also, add a comment to the ALIGNED macro describing the correct usage
llvm-svn: 183214
This commit is contained in:
parent
5239d58c8e
commit
baf90ccfac
|
@ -40,7 +40,7 @@ void AsanThreadContext::OnFinished() {
|
|||
}
|
||||
|
||||
// MIPS requires aligned address
|
||||
static char thread_registry_placeholder[sizeof(ThreadRegistry)] ALIGNED(16);
|
||||
static ALIGNED(16) char thread_registry_placeholder[sizeof(ThreadRegistry)];
|
||||
static ThreadRegistry *asan_thread_registry;
|
||||
|
||||
static ThreadContextBase *GetAsanThreadContext(u32 tid) {
|
||||
|
|
|
@ -132,6 +132,8 @@ using namespace __sanitizer; // NOLINT
|
|||
#else // _MSC_VER
|
||||
# define ALWAYS_INLINE inline __attribute__((always_inline))
|
||||
# define ALIAS(x) __attribute__((alias(x)))
|
||||
// Please only use the ALIGNED macro before the type.
|
||||
// Using ALIGNED after the variable declaration is not portable!
|
||||
# define ALIGNED(x) __attribute__((aligned(x)))
|
||||
# define FORMAT(f, a) __attribute__((format(printf, f, a)))
|
||||
# define NOINLINE __attribute__((noinline))
|
||||
|
|
Loading…
Reference in New Issue