Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying some AST...
[oota-llvm.git] / examples / Kaleidoscope / Orc / lazy_codegen / toy.cpp
index f5a6c19614b3a19975bc7dea5b4ff6edf46c1707..1dc4772d5257c96d8d4c0e0d086516eae9e32e53 100644 (file)
@@ -781,7 +781,7 @@ Value *BinaryExprAST::IRGen(IRGenContext &C) const {
   // Special case '=' because we don't want to emit the LHS as an expression.
   if (Op == '=') {
     // Assignment requires the LHS to be an identifier.
   // Special case '=' because we don't want to emit the LHS as an expression.
   if (Op == '=') {
     // Assignment requires the LHS to be an identifier.
-    auto LHSVar = static_cast<VariableExprAST&>(*LHS);
+    auto &LHSVar = static_cast<VariableExprAST &>(*LHS);
     // Codegen the RHS.
     Value *Val = RHS->IRGen(C);
     if (!Val) return nullptr;
     // Codegen the RHS.
     Value *Val = RHS->IRGen(C);
     if (!Val) return nullptr;