Implement IndirectValue (#588)

Also updates `FieldAccess` to use `IndirectValue`, as an example.
This commit is contained in:
Geoff Romer
2021-06-24 11:26:28 -07:00
committed by GitHub
parent 85cfb3b930
commit 6ca6822157
8 changed files with 265 additions and 7 deletions
+3 -1
View File
@@ -9,6 +9,8 @@
#include <variant>
#include <vector>
#include "common/indirect_value.h"
namespace Carbon {
struct Expression;
@@ -62,7 +64,7 @@ struct Variable {
struct FieldAccess {
static constexpr ExpressionKind Kind = ExpressionKind::GetField;
const Expression* aggregate;
IndirectValue<Expression> aggregate;
std::string field;
};