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

Side by Side Diff: src/base/compiler-specific.h

Issue 877753007: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: VS201x now happy? Created 5 years, 10 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 | « src/arm64/macro-assembler-arm64.cc ('k') | src/base/logging.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 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_BASE_COMPILER_SPECIFIC_H_ 5 #ifndef V8_BASE_COMPILER_SPECIFIC_H_
6 #define V8_BASE_COMPILER_SPECIFIC_H_ 6 #define V8_BASE_COMPILER_SPECIFIC_H_
7 7
8 #include "include/v8config.h" 8 #include "include/v8config.h"
9 9
10 // Annotate a typedef or function indicating it's ok if it's not used. 10 // Annotate a typedef or function indicating it's ok if it's not used.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Annotate a function indicating the caller must examine the return value. 45 // Annotate a function indicating the caller must examine the return value.
46 // Use like: 46 // Use like:
47 // int foo() WARN_UNUSED_RESULT; 47 // int foo() WARN_UNUSED_RESULT;
48 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT 48 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT
49 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) 49 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
50 #else 50 #else
51 #define WARN_UNUSED_RESULT /* NOT SUPPORTED */ 51 #define WARN_UNUSED_RESULT /* NOT SUPPORTED */
52 #endif 52 #endif
53 53
54
55 // The C++ standard requires that static const members have an out-of-class
56 // definition (in a single compilation unit), but MSVC chokes on this (when
57 // language extensions, which are required, are enabled). (You're only likely to
58 // notice the need for a definition if you take the address of the member or,
59 // more commonly, pass it to a function that takes it as a reference argument --
60 // probably an STL function.) This macro makes MSVC do the right thing. See
61 // http://msdn.microsoft.com/en-us/library/34h23df8(v=vs.100).aspx for more
62 // information. Use like:
63 //
64 // In .h file:
65 // struct Foo {
66 // static const int kBar = 5;
67 // };
68 //
69 // In .cc file:
70 // STATIC_CONST_MEMBER_DEFINITION const int Foo::kBar;
71 #if V8_HAS_DECLSPEC_SELECTANY
72 #define STATIC_CONST_MEMBER_DEFINITION __declspec(selectany)
73 #else
74 #define STATIC_CONST_MEMBER_DEFINITION
75 #endif
76
54 #endif // V8_BASE_COMPILER_SPECIFIC_H_ 77 #endif // V8_BASE_COMPILER_SPECIFIC_H_
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/base/logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698