AddressSanitizer: Replace __attribute__ with macro (for Win compatibility). Patch by timurrrr@google.com

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@149686 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/asan/asan_internal.h b/lib/asan/asan_internal.h
index 65c825e..713f17c 100644
--- a/lib/asan/asan_internal.h
+++ b/lib/asan/asan_internal.h
@@ -30,9 +30,21 @@
 typedef __int16          int16_t;
 typedef __int32          int32_t;
 typedef __int64          int64_t;
-#else
+
+# define ALIAS(x)   // TODO(timurrrr): do we need this on Windows?
+# define ALIGNED(x) __declspec(align(x))
+# define NOINLINE __declspec(noinline)
+
+# define ASAN_INTERFACE_ATTRIBUTE  // TODO(timurrrr): do we need this on Win?
+#else  // defined(_WIN32)
 # include <stdint.h>  // for __WORDSIZE
-#endif  // _WIN32
+
+# define ALIAS(x) __attribute__((alias(x)))
+# define ALIGNED(x) __attribute__((aligned(x)))
+# define NOINLINE __attribute__((noinline))
+
+# define ASAN_INTERFACE_ATTRIBUTE __attribute__((visibility("default")))
+#endif  // defined(_WIN32)
 
 // If __WORDSIZE was undefined by the platform, define it in terms of the
 // compiler built-ins __LP64__ and _WIN64.