comparison examples/Kaleidoscope/Chapter2/toy.cpp @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 1172e4bd9c6f
children
comparison
equal deleted inserted replaced
120:1172e4bd9c6f 121:803732b1fca8
138 std::vector<std::string> Args; 138 std::vector<std::string> Args;
139 139
140 public: 140 public:
141 PrototypeAST(const std::string &Name, std::vector<std::string> Args) 141 PrototypeAST(const std::string &Name, std::vector<std::string> Args)
142 : Name(Name), Args(std::move(Args)) {} 142 : Name(Name), Args(std::move(Args)) {}
143
144 const std::string &getName() const { return Name; }
143 }; 145 };
144 146
145 /// FunctionAST - This class represents a function definition itself. 147 /// FunctionAST - This class represents a function definition itself.
146 class FunctionAST { 148 class FunctionAST {
147 std::unique_ptr<PrototypeAST> Proto; 149 std::unique_ptr<PrototypeAST> Proto;