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

Side by Side Diff: build/buildflag.h

Issue 1847123002: Tiny fix in buildflag.h comment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium 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 BUILD_BUILDFLAG_H_ 5 #ifndef BUILD_BUILDFLAG_H_
6 #define BUILD_BUILDFLAG_H_ 6 #define BUILD_BUILDFLAG_H_
7 7
8 // These macros un-mangle the names of the build flags in a way that looks 8 // These macros un-mangle the names of the build flags in a way that looks
9 // natural, and gives errors if the flag is not defined. Normally in the 9 // natural, and gives errors if the flag is not defined. Normally in the
10 // preprocessor it's easy to make mistakes that interpret "you haven't done 10 // preprocessor it's easy to make mistakes that interpret "you haven't done
11 // the setup to know what the flag is" as "flag is off". Normally you would 11 // the setup to know what the flag is" as "flag is off". Normally you would
12 // include the generated header rather than include this file directly. 12 // include the generated header rather than include this file directly.
13 // 13 //
14 // This is for use with generated headers. See build/build_header.gni. 14 // This is for use with generated headers. See build/buildflag_header.gni.
15 15
16 // This dance of two macros does a concatenation of two preprocessor args using 16 // This dance of two macros does a concatenation of two preprocessor args using
17 // ## doubly indirectly because using ## directly prevents macros in that 17 // ## doubly indirectly because using ## directly prevents macros in that
18 // parameter from being expanded. 18 // parameter from being expanded.
19 #define BUILDFLAG_CAT_INDIRECT(a, b) a ## b 19 #define BUILDFLAG_CAT_INDIRECT(a, b) a ## b
20 #define BUILDFLAG_CAT(a, b) BUILDFLAG_CAT_INDIRECT(a, b) 20 #define BUILDFLAG_CAT(a, b) BUILDFLAG_CAT_INDIRECT(a, b)
21 21
22 // Accessor for build flags. 22 // Accessor for build flags.
23 // 23 //
24 // To test for a value, if the build file specifies: 24 // To test for a value, if the build file specifies:
(...skipping 13 matching lines...) Expand all
38 // the value in expressions: 38 // the value in expressions:
39 // 39 //
40 // const char kSpamServerName[] = BUILDFLAG(SPAM_SERVER_NAME); 40 // const char kSpamServerName[] = BUILDFLAG(SPAM_SERVER_NAME);
41 // 41 //
42 // Because the flag is accessed as a preprocessor macro with (), an error 42 // Because the flag is accessed as a preprocessor macro with (), an error
43 // will be thrown if the proper header defining the internal flag value has 43 // will be thrown if the proper header defining the internal flag value has
44 // not been included. 44 // not been included.
45 #define BUILDFLAG(flag) (BUILDFLAG_CAT(BUILDFLAG_INTERNAL_, flag)()) 45 #define BUILDFLAG(flag) (BUILDFLAG_CAT(BUILDFLAG_INTERNAL_, flag)())
46 46
47 #endif // BUILD_BUILDFLAG_H_ 47 #endif // BUILD_BUILDFLAG_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698