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

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

Issue 2515213002: WTF: Remove NO_RETURN, NO_RETURN_DUE_TO_CRASH, and NO_RETURN_DUE_TO_ASSERT. (Closed)
Patch Set: Created 4 years, 1 month 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #define GCC_VERSION_AT_LEAST(major, minor, patch) \ 54 #define GCC_VERSION_AT_LEAST(major, minor, patch) \
55 (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) 55 (GCC_VERSION >= (major * 10000 + minor * 100 + patch))
56 #else 56 #else
57 /* Define this for !GCC compilers, just so we can write things like 57 /* Define this for !GCC compilers, just so we can write things like
58 * GCC_VERSION_AT_LEAST(4, 1, 0). */ 58 * GCC_VERSION_AT_LEAST(4, 1, 0). */
59 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0 59 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0
60 #endif 60 #endif
61 61
62 /* ==== Compiler features ==== */ 62 /* ==== Compiler features ==== */
63 63
64 /* NO_RETURN */
65
66 #ifndef NO_RETURN
Yuta Kitamura 2016/11/21 08:55:21 I was initially a bit hesitant to remove this, bec
67 #if COMPILER(GCC)
68 #define NO_RETURN __attribute((__noreturn__))
69 #elif COMPILER(MSVC)
70 #define NO_RETURN __declspec(noreturn)
71 #else
72 #define NO_RETURN
73 #endif
74 #endif
75
76 /* NEVER_INLINE */ 64 /* NEVER_INLINE */
77 65
78 // TODO(palmer): Remove this and update callers to use NOINLINE from Chromium 66 // TODO(palmer): Remove this and update callers to use NOINLINE from Chromium
79 // base. https://bugs.chromium.org/p/chromium/issues/detail?id=632441 67 // base. https://bugs.chromium.org/p/chromium/issues/detail?id=632441
80 // 68 //
81 // For compatibility with callers in Blink: 69 // For compatibility with callers in Blink:
82 #define NEVER_INLINE NOINLINE 70 #define NEVER_INLINE NOINLINE
83 71
84 /* WARN_UNUSED_RETURN */ 72 /* WARN_UNUSED_RETURN */
85 73
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 /* WTF_NON_EXPORTED_BASE; similar NON_EXPORTED_BASE in base/compiler_specific.h 114 /* WTF_NON_EXPORTED_BASE; similar NON_EXPORTED_BASE in base/compiler_specific.h
127 */ 115 */
128 116
129 #if COMPILER(MSVC) 117 #if COMPILER(MSVC)
130 #define WTF_NON_EXPORTED_BASE(code) __pragma(warning(suppress : 4275)) code 118 #define WTF_NON_EXPORTED_BASE(code) __pragma(warning(suppress : 4275)) code
131 #else 119 #else
132 #define WTF_NON_EXPORTED_BASE(code) code 120 #define WTF_NON_EXPORTED_BASE(code) code
133 #endif 121 #endif
134 122
135 #endif /* WTF_Compiler_h */ 123 #endif /* WTF_Compiler_h */
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Assertions.h ('k') | third_party/WebKit/Source/wtf/text/StringImplCF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698