From 5305d3933a55f7153971821b9c7194a080b6b699 Mon Sep 17 00:00:00 2001 From: Peter Szecsi Date: Sun, 7 May 2017 11:00:01 +0000 Subject: [Kaleidoscope] toy.cpp use after move fix The variable Proto is moved at the beginning of the codegen() function. According to the comment above, the pointed object should be used due the reference P. Differential Revision: https://reviews.llvm.org/D32939 llvm-svn: 302369 --- llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp') diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp index 945b9706d4d..163caa6872d 100644 --- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp +++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp @@ -1092,7 +1092,7 @@ Function *FunctionAST::codegen() { TheFunction->eraseFromParent(); if (P.isBinaryOp()) - BinopPrecedence.erase(Proto->getOperatorName()); + BinopPrecedence.erase(P.getOperatorName()); return nullptr; } -- cgit v1.2.3