diff options
Diffstat (limited to 'llvm/examples/Kaleidoscope/Chapter3/toy.cpp')
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter3/toy.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp index 328189c1184..05697ea70a4 100644 --- a/llvm/examples/Kaleidoscope/Chapter3/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter3/toy.cpp @@ -8,6 +8,7 @@ #include <map> #include <string> #include <vector> + using namespace llvm; //===----------------------------------------------------------------------===// @@ -58,7 +59,7 @@ static int gettok() { LastChar = getchar(); } while (isdigit(LastChar) || LastChar == '.'); - NumVal = strtod(NumStr.c_str(), 0); + NumVal = strtod(NumStr.c_str(), nullptr); return tok_number; } @@ -193,6 +194,7 @@ std::unique_ptr<ExprAST> Error(const char *Str) { fprintf(stderr, "Error: %s\n", Str); return nullptr; } + std::unique_ptr<PrototypeAST> ErrorP(const char *Str) { Error(Str); return nullptr; |