aboutsummaryrefslogtreecommitdiff
path: root/eval.h
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-02-28 00:07:45 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-28 00:07:45 +0000
commitec7c40a97a07acadd78d93dd8d9f2c8d361513ef (patch)
tree50dc0ba49533e72d89b1976e4db885c1262af993 /eval.h
parentc9a995f540feccf188231282acb13fd302170e74 (diff)
parent1e0a27120f281a436ad59aaa235599f73688ffa1 (diff)
downloadkati-ec7c40a97a07acadd78d93dd8d9f2c8d361513ef.tar.gz
am: 1e0a27120f Change-Id: Ic21f2f0b53d2641cea9f802869b733c70794e5c7
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/eval.h b/eval.h
index e588f7e..4fb5f05 100644
--- a/eval.h
+++ b/eval.h
@@ -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_;