summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/profile/InstrProfilingPort.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingPort.h')
-rw-r--r--compiler-rt/lib/profile/InstrProfilingPort.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPort.h b/compiler-rt/lib/profile/InstrProfilingPort.h
index 0f826cbc9cd..9e3fb8389aa 100644
--- a/compiler-rt/lib/profile/InstrProfilingPort.h
+++ b/compiler-rt/lib/profile/InstrProfilingPort.h
@@ -14,10 +14,12 @@
#define COMPILER_RT_ALIGNAS(x) __declspec(align(x))
#define COMPILER_RT_VISIBILITY
#define COMPILER_RT_WEAK __declspec(selectany)
+#define COMPILER_RT_ALLOCA _alloca
#elif __GNUC__
#define COMPILER_RT_ALIGNAS(x) __attribute__((aligned(x)))
#define COMPILER_RT_VISIBILITY __attribute__((visibility("hidden")))
#define COMPILER_RT_WEAK __attribute__((weak))
+#define COMPILER_RT_ALLOCA __builtin_alloca
#endif
#define COMPILER_RT_SECTION(Sect) __attribute__((section(Sect)))
@@ -25,14 +27,11 @@
#define COMPILER_RT_MAX_HOSTLEN 128
#ifdef _MSC_VER
#define COMPILER_RT_GETHOSTNAME(Name, Len) gethostname(Name, Len)
-#define COMPILER_RT_ALLOCA _alloca
#elif defined(__PS4__)
#define COMPILER_RT_GETHOSTNAME(Name, Len) (-1)
-#define COMPILER_RT_ALLOCA alloca
#else
#define COMPILER_RT_GETHOSTNAME(Name, Len) lprofGetHostName(Name, Len)
#define COMPILER_RT_HAS_UNAME 1
-#define COMPILER_RT_ALLOCA alloca
#endif
#if COMPILER_RT_HAS_ATOMICS == 1
OpenPOWER on IntegriCloud