summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
authorPeter Szecsi <szepet95@gmail.com>2017-05-07 11:00:01 +0000
committerPeter Szecsi <szepet95@gmail.com>2017-05-07 11:00:01 +0000
commit5305d3933a55f7153971821b9c7194a080b6b699 (patch)
tree57f79570366c65e58c0ae251820f466bbc997c28 /llvm/examples
parentdf8c2ebe7346669618c89379af8a9ae8cfda7cfe (diff)
downloadbcm5719-llvm-5305d3933a55f7153971821b9c7194a080b6b699.tar.gz
bcm5719-llvm-5305d3933a55f7153971821b9c7194a080b6b699.zip
[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
Diffstat (limited to 'llvm/examples')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter6/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter7/toy.cpp2
-rw-r--r--llvm/examples/Kaleidoscope/Chapter8/toy.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
index 945b9706d4d..163caa6872d 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
@@ -1092,7 +1092,7 @@ Function *FunctionAST::codegen() {
TheFunction->eraseFromParent();
if (P.isBinaryOp())
- BinopPrecedence.erase(Proto->getOperatorName());
+ BinopPrecedence.erase(P.getOperatorName());
return nullptr;
}
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
index 945b9706d4d..163caa6872d 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
@@ -1092,7 +1092,7 @@ Function *FunctionAST::codegen() {
TheFunction->eraseFromParent();
if (P.isBinaryOp())
- BinopPrecedence.erase(Proto->getOperatorName());
+ BinopPrecedence.erase(P.getOperatorName());
return nullptr;
}
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;
}
diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
index 1e0ddca29b6..0c222173558 100644
--- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp
@@ -932,7 +932,7 @@ Function *FunctionAST::codegen() {
TheFunction->eraseFromParent();
if (P.isBinaryOp())
- BinopPrecedence.erase(Proto->getOperatorName());
+ BinopPrecedence.erase(P.getOperatorName());
return nullptr;
}
diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp
index 2f8cb682a84..79ac7b33d7a 100644
--- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp
@@ -1099,7 +1099,7 @@ Function *FunctionAST::codegen() {
TheFunction->eraseFromParent();
if (P.isBinaryOp())
- BinopPrecedence.erase(Proto->getOperatorName());
+ BinopPrecedence.erase(P.getOperatorName());
return nullptr;
}
diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
index cdf650973b8..3ed98fcfdb5 100644
--- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp
@@ -1097,7 +1097,7 @@ Function *FunctionAST::codegen() {
TheFunction->eraseFromParent();
if (P.isBinaryOp())
- BinopPrecedence.erase(Proto->getOperatorName());
+ BinopPrecedence.erase(P.getOperatorName());
return nullptr;
}
OpenPOWER on IntegriCloud