Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: Source/wtf/Compiler.h

Issue 14247037: Remove the COMPILER(RVCT) guard. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/wtf/Assertions.h ('k') | Source/wtf/Platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #define WTF_COMPILER_SUPPORTS_CXX_NULLPTR 1 87 #define WTF_COMPILER_SUPPORTS_CXX_NULLPTR 1
88 #endif 88 #endif
89 89
90 #if !COMPILER(CLANG) 90 #if !COMPILER(CLANG)
91 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1 91 #define WTF_COMPILER_SUPPORTS_CXX_OVERRIDE_CONTROL 1
92 #define WTF_COMPILER_QUIRK_FINAL_IS_CALLED_SEALED 1 92 #define WTF_COMPILER_QUIRK_FINAL_IS_CALLED_SEALED 1
93 #endif 93 #endif
94 94
95 #endif 95 #endif
96 96
97 /* COMPILER(RVCT) - ARM RealView Compilation Tools */
98 #if defined(__CC_ARM) || defined(__ARMCC__)
99 #define WTF_COMPILER_RVCT 1
100 #define RVCT_VERSION_AT_LEAST(major, minor, patch, build) (__ARMCC_VERSION >= (m ajor * 100000 + minor * 10000 + patch * 1000 + build))
101 #else
102 /* Define this for !RVCT compilers, just so we can write things like RVCT_VERSIO N_AT_LEAST(3, 0, 0, 0). */
103 #define RVCT_VERSION_AT_LEAST(major, minor, patch, build) 0
104 #endif
105
106 /* COMPILER(GCCE) - GNU Compiler Collection for Embedded */ 97 /* COMPILER(GCCE) - GNU Compiler Collection for Embedded */
107 #if defined(__GCCE__) 98 #if defined(__GCCE__)
108 #define WTF_COMPILER_GCCE 1 99 #define WTF_COMPILER_GCCE 1
109 #define GCCE_VERSION (__GCCE__ * 10000 + __GCCE_MINOR__ * 100 + __GCCE_PATCHLEVE L__) 100 #define GCCE_VERSION (__GCCE__ * 10000 + __GCCE_MINOR__ * 100 + __GCCE_PATCHLEVE L__)
110 #define GCCE_VERSION_AT_LEAST(major, minor, patch) (GCCE_VERSION >= (major * 100 00 + minor * 100 + patch)) 101 #define GCCE_VERSION_AT_LEAST(major, minor, patch) (GCCE_VERSION >= (major * 100 00 + minor * 100 + patch))
111 #endif 102 #endif
112 103
113 /* COMPILER(GCC) - GNU Compiler Collection */ 104 /* COMPILER(GCC) - GNU Compiler Collection */
114 /* --gnu option of the RVCT compiler also defines __GNUC__ */ 105 #if defined(__GNUC__)
115 #if defined(__GNUC__) && !COMPILER(RVCT)
116 #define WTF_COMPILER_GCC 1 106 #define WTF_COMPILER_GCC 1
117 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL __) 107 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL __)
118 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) 108 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch))
119 #else 109 #else
120 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_ AT_LEAST(4, 1, 0). */ 110 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_ AT_LEAST(4, 1, 0). */
121 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0 111 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0
122 #endif 112 #endif
123 113
124 /* Specific compiler features */ 114 /* Specific compiler features */
125 #if COMPILER(GCC) && !COMPILER(CLANG) 115 #if COMPILER(GCC) && !COMPILER(CLANG)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #endif 162 #endif
173 163
174 /* ==== Compiler features ==== */ 164 /* ==== Compiler features ==== */
175 165
176 166
177 /* ALWAYS_INLINE */ 167 /* ALWAYS_INLINE */
178 168
179 #ifndef ALWAYS_INLINE 169 #ifndef ALWAYS_INLINE
180 #if COMPILER(GCC) && defined(NDEBUG) && !COMPILER(MINGW) 170 #if COMPILER(GCC) && defined(NDEBUG) && !COMPILER(MINGW)
181 #define ALWAYS_INLINE inline __attribute__((__always_inline__)) 171 #define ALWAYS_INLINE inline __attribute__((__always_inline__))
182 #elif (COMPILER(MSVC) || COMPILER(RVCT)) && defined(NDEBUG) 172 #elif COMPILER(MSVC) && defined(NDEBUG)
183 #define ALWAYS_INLINE __forceinline 173 #define ALWAYS_INLINE __forceinline
184 #else 174 #else
185 #define ALWAYS_INLINE inline 175 #define ALWAYS_INLINE inline
186 #endif 176 #endif
187 #endif 177 #endif
188 178
189 179
190 /* NEVER_INLINE */ 180 /* NEVER_INLINE */
191 181
192 #ifndef NEVER_INLINE 182 #ifndef NEVER_INLINE
193 #if COMPILER(GCC) 183 #if COMPILER(GCC)
194 #define NEVER_INLINE __attribute__((__noinline__)) 184 #define NEVER_INLINE __attribute__((__noinline__))
195 #elif COMPILER(RVCT)
196 #define NEVER_INLINE __declspec(noinline)
197 #else 185 #else
198 #define NEVER_INLINE 186 #define NEVER_INLINE
199 #endif 187 #endif
200 #endif 188 #endif
201 189
202 190
203 /* UNLIKELY */ 191 /* UNLIKELY */
204 192
205 #ifndef UNLIKELY 193 #ifndef UNLIKELY
206 #if COMPILER(GCC) || (COMPILER(RVCT) && defined(__GNUC__)) 194 #if COMPILER(GCC)
207 #define UNLIKELY(x) __builtin_expect((x), 0) 195 #define UNLIKELY(x) __builtin_expect((x), 0)
208 #else 196 #else
209 #define UNLIKELY(x) (x) 197 #define UNLIKELY(x) (x)
210 #endif 198 #endif
211 #endif 199 #endif
212 200
213 201
214 /* LIKELY */ 202 /* LIKELY */
215 203
216 #ifndef LIKELY 204 #ifndef LIKELY
217 #if COMPILER(GCC) || (COMPILER(RVCT) && defined(__GNUC__)) 205 #if COMPILER(GCC)
218 #define LIKELY(x) __builtin_expect((x), 1) 206 #define LIKELY(x) __builtin_expect((x), 1)
219 #else 207 #else
220 #define LIKELY(x) (x) 208 #define LIKELY(x) (x)
221 #endif 209 #endif
222 #endif 210 #endif
223 211
224 212
225 /* NO_RETURN */ 213 /* NO_RETURN */
226 214
227 215
228 #ifndef NO_RETURN 216 #ifndef NO_RETURN
229 #if COMPILER(GCC) 217 #if COMPILER(GCC)
230 #define NO_RETURN __attribute((__noreturn__)) 218 #define NO_RETURN __attribute((__noreturn__))
231 #elif COMPILER(MSVC) || COMPILER(RVCT) 219 #elif COMPILER(MSVC)
232 #define NO_RETURN __declspec(noreturn) 220 #define NO_RETURN __declspec(noreturn)
233 #else 221 #else
234 #define NO_RETURN 222 #define NO_RETURN
235 #endif 223 #endif
236 #endif 224 #endif
237 225
238 226
239 /* NO_RETURN_WITH_VALUE */ 227 /* NO_RETURN_WITH_VALUE */
240 228
241 #ifndef NO_RETURN_WITH_VALUE 229 #ifndef NO_RETURN_WITH_VALUE
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 #define OBJC_CLASS class 278 #define OBJC_CLASS class
291 #endif 279 #endif
292 #endif 280 #endif
293 281
294 /* ABI */ 282 /* ABI */
295 #if defined(__ARM_EABI__) || defined(__EABI__) 283 #if defined(__ARM_EABI__) || defined(__EABI__)
296 #define WTF_COMPILER_SUPPORTS_EABI 1 284 #define WTF_COMPILER_SUPPORTS_EABI 1
297 #endif 285 #endif
298 286
299 #endif /* WTF_Compiler_h */ 287 #endif /* WTF_Compiler_h */
OLDNEW
« no previous file with comments | « Source/wtf/Assertions.h ('k') | Source/wtf/Platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698