From: David Blaikie Date: Thu, 8 Oct 2015 17:22:12 +0000 (+0000) Subject: Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying some AST... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e6bb1eaae586b01f4d96ba2f7b82c4c26ae38fd9;hp=0317b8efaff0addbf14d66583f37483c65e3f7f2;p=oota-llvm.git 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 --- 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;