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

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

Issue 1883093002: Add support for generating the QtCreator projects from GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 #include "tools/gn/import_manager.h" 5 #include "tools/gn/import_manager.h"
6 6
7 #include "tools/gn/err.h" 7 #include "tools/gn/err.h"
8 #include "tools/gn/parse_tree.h" 8 #include "tools/gn/parse_tree.h"
9 #include "tools/gn/scheduler.h" 9 #include "tools/gn/scheduler.h"
10 #include "tools/gn/scope_per_file_provider.h" 10 #include "tools/gn/scope_per_file_provider.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Promote the now-read-only scope to outside the load lock. 104 // Promote the now-read-only scope to outside the load lock.
105 import_scope = import_info->scope.get(); 105 import_scope = import_info->scope.get();
106 } 106 }
107 107
108 Scope::MergeOptions options; 108 Scope::MergeOptions options;
109 options.skip_private_vars = true; 109 options.skip_private_vars = true;
110 options.mark_dest_used = true; // Don't require all imported values be used. 110 options.mark_dest_used = true; // Don't require all imported values be used.
111 return import_scope->NonRecursiveMergeTo(scope, options, node_for_err, 111 return import_scope->NonRecursiveMergeTo(scope, options, node_for_err,
112 "import", err); 112 "import", err);
113 } 113 }
114
115 std::vector<SourceFile> ImportManager::GetImportedFiles() const {
116 std::vector<SourceFile> imported_files;
117 imported_files.resize(imports_.size());
118 std::transform(imports_.begin(), imports_.end(), imported_files.begin(),
119 [](const ImportMap::value_type& val) { return val.first; });
120 return imported_files;
121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698