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

Side by Side Diff: tools/gn/item.cc

Issue 21114002: Add initial prototype for the GN meta-buildsystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add owners and readme Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/item.h ('k') | tools/gn/item_node.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "tools/gn/item.h"
6
7 #include "base/logging.h"
8
9 Item::Item(const Label& label) : label_(label) {
10 }
11
12 Item::~Item() {
13 }
14
15 Config* Item::AsConfig() { return NULL; }
16 const Config* Item::AsConfig() const { return NULL; }
17 Target* Item::AsTarget() { return NULL; }
18 const Target* Item::AsTarget() const { return NULL; }
19 Toolchain* Item::AsToolchain() { return NULL; }
20 const Toolchain* Item::AsToolchain() const { return NULL; }
21
22 std::string Item::GetItemTypeName() const {
23 if (AsConfig())
24 return "config";
25 if (AsTarget())
26 return "target";
27 if (AsToolchain())
28 return "toolchain";
29 NOTREACHED();
30 return "this thing that I have no idea what it is";
31 }
OLDNEW
« no previous file with comments | « tools/gn/item.h ('k') | tools/gn/item_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698