Index: src/sksl/ir/SkSLVariableReference.h |
diff --git a/src/sksl/ir/SkSLVariableReference.h b/src/sksl/ir/SkSLVariableReference.h |
index b443da1f22869fb4393c9f121836730352ae0d22..8499511a1b531e88ce00c6e4ddadccb0fb82c7c6 100644 |
--- a/src/sksl/ir/SkSLVariableReference.h |
+++ b/src/sksl/ir/SkSLVariableReference.h |
@@ -20,15 +20,15 @@ |
* there is only one Variable 'x', but two VariableReferences to it. |
*/ |
struct VariableReference : public Expression { |
- VariableReference(Position position, const Variable& variable) |
- : INHERITED(position, kVariableReference_Kind, variable.fType) |
- , fVariable(variable) {} |
+ VariableReference(Position position, std::shared_ptr<Variable> variable) |
+ : INHERITED(position, kVariableReference_Kind, variable->fType) |
+ , fVariable(std::move(variable)) {} |
std::string description() const override { |
- return fVariable.fName; |
+ return fVariable->fName; |
} |
- const Variable& fVariable; |
+ const std::shared_ptr<Variable> fVariable; |
typedef Expression INHERITED; |
}; |