X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=examples%2FKaleidoscope%2FChapter3%2Ftoy.cpp;h=05697ea70a490e9e6a72635d24a65e22727fda66;hp=328189c118465e66480ee303e74fa8d16454eeca;hb=d16725c31fbb40fcbf0cdf68b2b417ba445c5140;hpb=23662fba704e684f24d3114bb399c80d5c0afbd9 diff --git a/examples/Kaleidoscope/Chapter3/toy.cpp b/examples/Kaleidoscope/Chapter3/toy.cpp index 328189c1184..05697ea70a4 100644 --- a/examples/Kaleidoscope/Chapter3/toy.cpp +++ b/examples/Kaleidoscope/Chapter3/toy.cpp @@ -8,6 +8,7 @@ #include #include #include + 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 Error(const char *Str) { fprintf(stderr, "Error: %s\n", Str); return nullptr; } + std::unique_ptr ErrorP(const char *Str) { Error(Str); return nullptr;