From e6bb1eaae586b01f4d96ba2f7b82c4c26ae38fd9 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 8 Oct 2015 17:22:12 +0000 Subject: [PATCH 1/1] Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying some AST nodes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249703 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/Kaleidoscope/Orc/fully_lazy/toy.cpp | 2 +- examples/Kaleidoscope/Orc/initial/toy.cpp | 2 +- examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp | 2 +- examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp index 667bca46afd..fe4ac5d0c28 100644 --- a/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp +++ b/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp @@ -782,7 +782,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. - auto LHSVar = static_cast(*LHS); + auto &LHSVar = static_cast(*LHS); // Codegen the RHS. Value *Val = RHS->IRGen(C); if (!Val) return nullptr; diff --git a/examples/Kaleidoscope/Orc/initial/toy.cpp b/examples/Kaleidoscope/Orc/initial/toy.cpp index 8dab73bf73a..085d0da8f51 100644 --- a/examples/Kaleidoscope/Orc/initial/toy.cpp +++ b/examples/Kaleidoscope/Orc/initial/toy.cpp @@ -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. - auto LHSVar = static_cast(*LHS); + auto &LHSVar = static_cast(*LHS); // Codegen the RHS. Value *Val = RHS->IRGen(C); if (!Val) return nullptr; diff --git a/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp b/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp index f5a6c19614b..1dc4772d525 100644 --- a/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp +++ b/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp @@ -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. - auto LHSVar = static_cast(*LHS); + auto &LHSVar = static_cast(*LHS); // Codegen the RHS. Value *Val = RHS->IRGen(C); if (!Val) return nullptr; diff --git a/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp b/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp index f9b972e8294..f53fe2477fe 100644 --- a/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp +++ b/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp @@ -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. - auto LHSVar = static_cast(*LHS); + auto &LHSVar = static_cast(*LHS); // Codegen the RHS. Value *Val = RHS->IRGen(C); if (!Val) return nullptr; -- 2.34.1