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

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

Issue 1088993003: Replace OVERRIDE->override and FINAL->final since we now require C++11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/ast-value-factory.cc ('k') | src/base/cpu.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.
11 // Use like: 11 // Use like:
12 // typedef Foo Bar ALLOW_UNUSED_TYPE; 12 // typedef Foo Bar ALLOW_UNUSED_TYPE;
13 #if V8_HAS_ATTRIBUTE_UNUSED 13 #if V8_HAS_ATTRIBUTE_UNUSED
14 #define ALLOW_UNUSED_TYPE __attribute__((unused)) 14 #define ALLOW_UNUSED_TYPE __attribute__((unused))
15 #else 15 #else
16 #define ALLOW_UNUSED_TYPE 16 #define ALLOW_UNUSED_TYPE
17 #endif 17 #endif
18 18
19 19
20 // Annotate a virtual method indicating it must be overriding a virtual
21 // method in the parent class.
22 // Use like:
23 // virtual void bar() OVERRIDE;
24 #if V8_HAS_CXX11_OVERRIDE
25 #define OVERRIDE override
26 #else
27 #define OVERRIDE /* NOT SUPPORTED */
28 #endif
29
30
31 // Annotate a virtual method indicating that subclasses must not override it,
32 // or annotate a class to indicate that it cannot be subclassed.
33 // Use like:
34 // class B FINAL : public A {};
35 // virtual void bar() FINAL;
36 #if V8_HAS_CXX11_FINAL
37 #define FINAL final
38 #elif V8_HAS___FINAL
39 #define FINAL __final
40 #else
41 #define FINAL /* NOT SUPPORTED */
42 #endif
43
44
45 // Annotate a function indicating the caller must examine the return value. 20 // Annotate a function indicating the caller must examine the return value.
46 // Use like: 21 // Use like:
47 // int foo() WARN_UNUSED_RESULT; 22 // int foo() WARN_UNUSED_RESULT;
48 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT 23 #if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT
49 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) 24 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
50 #else 25 #else
51 #define WARN_UNUSED_RESULT /* NOT SUPPORTED */ 26 #define WARN_UNUSED_RESULT /* NOT SUPPORTED */
52 #endif 27 #endif
53 28
54 29
(...skipping 13 matching lines...) Expand all
68 // 43 //
69 // In .cc file: 44 // In .cc file:
70 // STATIC_CONST_MEMBER_DEFINITION const int Foo::kBar; 45 // STATIC_CONST_MEMBER_DEFINITION const int Foo::kBar;
71 #if V8_HAS_DECLSPEC_SELECTANY 46 #if V8_HAS_DECLSPEC_SELECTANY
72 #define STATIC_CONST_MEMBER_DEFINITION __declspec(selectany) 47 #define STATIC_CONST_MEMBER_DEFINITION __declspec(selectany)
73 #else 48 #else
74 #define STATIC_CONST_MEMBER_DEFINITION 49 #define STATIC_CONST_MEMBER_DEFINITION
75 #endif 50 #endif
76 51
77 #endif // V8_BASE_COMPILER_SPECIFIC_H_ 52 #endif // V8_BASE_COMPILER_SPECIFIC_H_
OLDNEW
« no previous file with comments | « src/ast-value-factory.cc ('k') | src/base/cpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698