Index: tools/gn/import_manager.cc |
diff --git a/tools/gn/import_manager.cc b/tools/gn/import_manager.cc |
index a1555b994541f9aa735c4491c3ea13c2227fd761..01c88b5a68c85dd1bce16a19c78d09d9ba6be4e1 100644 |
--- a/tools/gn/import_manager.cc |
+++ b/tools/gn/import_manager.cc |
@@ -111,3 +111,11 @@ bool ImportManager::DoImport(const SourceFile& file, |
return import_scope->NonRecursiveMergeTo(scope, options, node_for_err, |
"import", err); |
} |
+ |
+std::vector<SourceFile> ImportManager::GetImportedFiles() const { |
+ std::vector<SourceFile> imported_files; |
+ imported_files.resize(imports_.size()); |
+ std::transform(imports_.begin(), imports_.end(), imported_files.begin(), |
+ [](const ImportMap::value_type& val) { return val.first; }); |
+ return imported_files; |
+} |