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

Side by Side Diff: tools/gn/label.h

Issue 2265833002: Implement `gn analyze`. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not pretty print the written json; this gets around crlf issues Created 4 years, 3 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 | « tools/gn/gn.gyp ('k') | 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 TOOLS_GN_LABEL_H_ 5 #ifndef TOOLS_GN_LABEL_H_
6 #define TOOLS_GN_LABEL_H_ 6 #define TOOLS_GN_LABEL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 14 matching lines...) Expand all
25 Label(const SourceDir& dir, 25 Label(const SourceDir& dir,
26 const base::StringPiece& name, 26 const base::StringPiece& name,
27 const SourceDir& toolchain_dir, 27 const SourceDir& toolchain_dir,
28 const base::StringPiece& toolchain_name); 28 const base::StringPiece& toolchain_name);
29 29
30 // Makes a label with an empty toolchain. 30 // Makes a label with an empty toolchain.
31 Label(const SourceDir& dir, const base::StringPiece& name); 31 Label(const SourceDir& dir, const base::StringPiece& name);
32 Label(const Label& other); 32 Label(const Label& other);
33 ~Label(); 33 ~Label();
34 34
35 // Resolives a string from a build file that may be relative to the 35 // Resolves a string from a build file that may be relative to the
36 // current directory into a fully qualified label. On failure returns an 36 // current directory into a fully qualified label. On failure returns an
37 // is_null() label and sets the error. 37 // is_null() label and sets the error.
38 static Label Resolve(const SourceDir& current_dir, 38 static Label Resolve(const SourceDir& current_dir,
39 const Label& current_toolchain, 39 const Label& current_toolchain,
40 const Value& input, 40 const Value& input,
41 Err* err); 41 Err* err);
42 42
43 bool is_null() const { return dir_.is_null(); } 43 bool is_null() const { return dir_.is_null(); }
44 44
45 const SourceDir& dir() const { return dir_; } 45 const SourceDir& dir() const { return dir_; }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 }; 118 };
119 119
120 } // namespace BASE_HASH_NAMESPACE 120 } // namespace BASE_HASH_NAMESPACE
121 121
122 inline void swap(Label& lhs, Label& rhs) { 122 inline void swap(Label& lhs, Label& rhs) {
123 lhs.swap(rhs); 123 lhs.swap(rhs);
124 } 124 }
125 125
126 #endif // TOOLS_GN_LABEL_H_ 126 #endif // TOOLS_GN_LABEL_H_
OLDNEW
« no previous file with comments | « tools/gn/gn.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698