[llvm] r249703 - Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying some AST nodes
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 10:22:13 PDT 2015
Author: dblaikie
Date: Thu Oct 8 12:22:12 2015
New Revision: 249703
URL: http://llvm.org/viewvc/llvm-project?rev=249703&view=rev
Log:
Make the Kaleidoscope Orc examples -Wdeprecated clean by avoiding copying some AST nodes
Modified:
llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp
llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp?rev=249703&r1=249702&r2=249703&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp Thu Oct 8 12:22:12 2015
@@ -782,7 +782,7 @@ Value *BinaryExprAST::IRGen(IRGenContext
// 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;
Modified: llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp?rev=249703&r1=249702&r2=249703&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/initial/toy.cpp Thu Oct 8 12:22:12 2015
@@ -781,7 +781,7 @@ Value *BinaryExprAST::IRGen(IRGenContext
// 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;
Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp?rev=249703&r1=249702&r2=249703&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp Thu Oct 8 12:22:12 2015
@@ -781,7 +781,7 @@ Value *BinaryExprAST::IRGen(IRGenContext
// 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;
Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp?rev=249703&r1=249702&r2=249703&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp Thu Oct 8 12:22:12 2015
@@ -781,7 +781,7 @@ Value *BinaryExprAST::IRGen(IRGenContext
// 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;
More information about the llvm-commits
mailing list