llvm.org GIT mirror llvm / 2c224bc
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302369 91177308-0d34-0410-b5e6-96231b3b80d8 Peter Szecsi 2 years ago
6 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
10911091 TheFunction->eraseFromParent();
10921092
10931093 if (P.isBinaryOp())
1094 BinopPrecedence.erase(Proto->getOperatorName());
1094 BinopPrecedence.erase(P.getOperatorName());
10951095 return nullptr;
10961096 }
10971097
10911091 TheFunction->eraseFromParent();
10921092
10931093 if (P.isBinaryOp())
1094 BinopPrecedence.erase(Proto->getOperatorName());
1094 BinopPrecedence.erase(P.getOperatorName());
10951095 return nullptr;
10961096 }
10971097
10911091 TheFunction->eraseFromParent();
10921092
10931093 if (P.isBinaryOp())
1094 BinopPrecedence.erase(Proto->getOperatorName());
1094 BinopPrecedence.erase(P.getOperatorName());
10951095 return nullptr;
10961096 }
10971097
931931 TheFunction->eraseFromParent();
932932
933933 if (P.isBinaryOp())
934 BinopPrecedence.erase(Proto->getOperatorName());
934 BinopPrecedence.erase(P.getOperatorName());
935935 return nullptr;
936936 }
937937
10981098 TheFunction->eraseFromParent();
10991099
11001100 if (P.isBinaryOp())
1101 BinopPrecedence.erase(Proto->getOperatorName());
1101 BinopPrecedence.erase(P.getOperatorName());
11021102 return nullptr;
11031103 }
11041104
10961096 TheFunction->eraseFromParent();
10971097
10981098 if (P.isBinaryOp())
1099 BinopPrecedence.erase(Proto->getOperatorName());
1099 BinopPrecedence.erase(P.getOperatorName());
11001100 return nullptr;
11011101 }
11021102