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.
5 #ifndef TOOLS_GN_IMPORT_MANAGER_H_
6 #define TOOLS_GN_IMPORT_MANAGER_H_
10 #include "base/synchronization/lock.h"
17 // Provides a cache of the results of importing scopes so the results can
18 // be re-used rather than running the imported files multiple times.
24 // Does an import of the given file into the given scope. On error, sets the
25 // error and returns false.
26 bool DoImport(const SourceFile& file,
27 const ParseNode* node_for_err,
34 // Owning pointers to the scopes.
35 typedef std::map<SourceFile, const Scope*> ImportMap;
38 DISALLOW_COPY_AND_ASSIGN(ImportManager);
41 #endif // TOOLS_GN_IMPORT_MANAGER_H_