X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=examples%2FKaleidoscope%2FChapter5%2Ftoy.cpp;h=eeca4775eeb11698617b88fa8b2275dee9b1cdb7;hb=d16725c31fbb40fcbf0cdf68b2b417ba445c5140;hp=57edf1aa8454da358aad51847fcfe7d9512ee154;hpb=9146833fa313fb0339355f9ca8b63122dd73ba88;p=oota-llvm.git diff --git a/examples/Kaleidoscope/Chapter5/toy.cpp b/examples/Kaleidoscope/Chapter5/toy.cpp index 57edf1aa845..eeca4775eeb 100644 --- a/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/examples/Kaleidoscope/Chapter5/toy.cpp @@ -82,7 +82,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; } @@ -242,6 +242,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;