diff options
author | Dan Willemsen <dwillemsen@google.com> | 2018-02-28 00:02:42 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-02-28 00:02:42 +0000 |
commit | 1e0a27120f281a436ad59aaa235599f73688ffa1 (patch) | |
tree | 50dc0ba49533e72d89b1976e4db885c1262af993 /eval.h | |
parent | f918bb964e67c57a9d5c00c1c284977c889aee86 (diff) | |
parent | f1e982d803de4ce4ed7b1a02735d2906074a8269 (diff) | |
download | kati-1e0a27120f281a436ad59aaa235599f73688ffa1.tar.gz |
Merge remote-tracking branch 'aosp/upstream' into master am: ac70a73c81
am: f1e982d803
Change-Id: Ic9c3a7a80c6e6eb9510f25f6323a1168fc9d219d
Diffstat (limited to 'eval.h')
-rw-r--r-- | eval.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -15,6 +15,7 @@ #ifndef EVAL_H_ #define EVAL_H_ +#include <memory> #include <unordered_map> #include <unordered_set> #include <vector> @@ -98,6 +99,16 @@ class Evaluator { } void DumpStackStats() const; + bool ExportDeprecated() const { return export_message_ && !export_error_; }; + bool ExportObsolete() const { return export_error_; }; + void SetExportDeprecated(StringPiece msg) { + export_message_.reset(new string(msg.as_string())); + } + void SetExportObsolete(StringPiece msg) { + export_message_.reset(new string(msg.as_string())); + export_error_ = true; + } + private: Var* EvalRHS(Symbol lhs, Value* rhs, @@ -139,6 +150,9 @@ class Evaluator { void* lowest_stack_; Loc lowest_loc_; + unique_ptr<string> export_message_; + bool export_error_; + static unordered_set<Symbol> used_undefined_vars_; Symbol kati_readonly_; |