Chromium Code Reviews| Index: tools/gn/loader.cc |
| diff --git a/tools/gn/loader.cc b/tools/gn/loader.cc |
| index 0ede3c95548389882fab5481a9f3ad532cb5e061..417a8914d17e01b492d51b28847356ffcd59dea5 100644 |
| --- a/tools/gn/loader.cc |
| +++ b/tools/gn/loader.cc |
| @@ -1,7 +1,6 @@ |
| // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| - |
| #include "tools/gn/loader.h" |
| #include "base/bind.h" |
| @@ -251,6 +250,11 @@ void LoaderImpl::BackgroundLoadFile(const Settings* settings, |
| } |
| Scope our_scope(settings->base_config()); |
| + |
| + const auto location = root->GetRange().begin(); |
|
brettw
2017/06/28 20:49:40
Good idea, I thought you would have to add a new p
|
| + if (!location.is_null()) |
| + our_scope.AddInputFile(location.file()); |
| + |
| ScopePerFileProvider per_file_provider(&our_scope, true); |
| our_scope.set_source_dir(file_name.GetDir()); |