[llvm] ba950ad - Update Kaleidoscope: Change headers

via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 26 22:41:13 PDT 2020


Author: sunshaoce
Date: 2020-09-27T05:40:50Z
New Revision: ba950ad0a51066868fbca37a8ad244eac9a228b7

URL: https://github.com/llvm/llvm-project/commit/ba950ad0a51066868fbca37a8ad244eac9a228b7
DIFF: https://github.com/llvm/llvm-project/commit/ba950ad0a51066868fbca37a8ad244eac9a228b7.diff

LOG: Update Kaleidoscope: Change headers

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D88141

Added: 
    

Modified: 
    llvm/examples/Kaleidoscope/Chapter2/toy.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
index 59432fb3de8f..882613533bb6 100644
--- a/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Chapter2/toy.cpp
@@ -1,11 +1,10 @@
-#include "llvm/ADT/STLExtras.h"
-#include <algorithm>
 #include <cctype>
 #include <cstdio>
 #include <cstdlib>
 #include <map>
 #include <memory>
 #include <string>
+#include <utility>
 #include <vector>
 
 //===----------------------------------------------------------------------===//
@@ -300,8 +299,8 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
     }
 
     // Merge LHS/RHS.
-    LHS = std::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
-                                           std::move(RHS));
+    LHS =
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -357,7 +356,7 @@ static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
     auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
-                                                 std::vector<std::string>());
+                                                std::vector<std::string>());
     return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;


        


More information about the llvm-commits mailing list