summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/int_lib.h
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-06 04:33:05 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-06 04:33:05 +0000
commite6f9652a22bc70938a201455791bd3bdc7f92723 (patch)
tree5906ad654364befa102673890176733e89c6f591 /compiler-rt/lib/builtins/int_lib.h
parent4c81f0a1bed040351ef45c82e28653ff98f267c3 (diff)
downloadbcm5719-llvm-e6f9652a22bc70938a201455791bd3bdc7f92723.tar.gz
bcm5719-llvm-e6f9652a22bc70938a201455791bd3bdc7f92723.zip
builtins: Use MSVC-equivalents of attributes
This allows us to build the builtins using MSVC. NFC. Patch by Tee Hao Wei! llvm-svn: 249375
Diffstat (limited to 'compiler-rt/lib/builtins/int_lib.h')
-rw-r--r--compiler-rt/lib/builtins/int_lib.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/int_lib.h b/compiler-rt/lib/builtins/int_lib.h
index 9a74d1e53fb..771cc5cfe76 100644
--- a/compiler-rt/lib/builtins/int_lib.h
+++ b/compiler-rt/lib/builtins/int_lib.h
@@ -35,13 +35,23 @@
# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
#else
# define ARM_EABI_FNALIAS(aeabi_name, name)
-# if defined(__arm__) && defined(_WIN32)
+# if defined(__arm__) && defined(_WIN32) && (!defined(_MSC_VER) || defined(__clang__))
# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
# else
# define COMPILER_RT_ABI
# endif
#endif
+#ifdef _MSC_VER
+#define NOINLINE __declspec(noinline)
+#define NORETURN __declspec(noreturn)
+#define UNUSED
+#else
+#define NOINLINE __attribute__((noinline))
+#define NORETURN __attribute__((noreturn))
+#define UNUSED __attribute__((unused))
+#endif
+
#if defined(__NetBSD__) && (defined(_KERNEL) || defined(_STANDALONE))
/*
* Kernel and boot environment can't use normal headers,
OpenPOWER on IntegriCloud