Index: tools/gn/scope.h |
diff --git a/tools/gn/scope.h b/tools/gn/scope.h |
index 31bac6261464826a3bd069b3dd7d87ba5f5eaeba..579947afbc3c88e1f61dc5f96da65954f7f5674f 100644 |
--- a/tools/gn/scope.h |
+++ b/tools/gn/scope.h |
@@ -204,10 +204,14 @@ class Scope { |
const Template* GetTemplate(const std::string& name) const; |
// Marks the given identifier as (un)used in the current scope. |
- void MarkUsed(const base::StringPiece& ident); |
- void MarkAllUsed(); |
+ void MarkUsed(const base::StringPiece& ident, Err* err); |
+ void MarkAllUsed(Err* err); |
void MarkUnused(const base::StringPiece& ident); |
+ // Marks the given identifier as unusable in the current scope. |
+ void MarkAllUnusable(Err* err, std::set<std::string> excluded_values); |
brettw
2017/06/20 17:27:25
The set should be passed by const ref.
Petr Hosek
2017/06/21 02:17:40
Done.
|
+ void MarkUnusable(const base::StringPiece& ident, Err* err); |
+ |
// Checks to see if the scope has a var set that hasn't been used. This is |
// called before replacing the var with a different one. It does not check |
// containing scopes. |
@@ -320,10 +324,11 @@ class Scope { |
friend class ProgrammaticProvider; |
struct Record { |
- Record() : used(false) {} |
- explicit Record(const Value& v) : used(false), value(v) {} |
+ Record() : used(false), unusable(false) {} |
+ explicit Record(const Value& v) : used(false), unusable(false), value(v) {} |
bool used; // Set to true when the variable is used. |
+ bool unusable; |
Value value; |
}; |