From c34a25d59d382aa00a94b3f0603ce8724c66606d Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 28 Apr 2014 04:05:08 +0000 Subject: [C++] Use 'nullptr'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207394 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/TGParser.cpp | 2 +- lib/TableGen/TGParser.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/TableGen') diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index f94c6f62a4..dd3a0967d1 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -115,7 +115,7 @@ bool TGParser::SetValue(Record *CurRec, SMLoc Loc, Init *ValName, // We should have a BitsInit type now. BitsInit *BInit = dyn_cast(BI); - assert(BInit != 0); + assert(BInit != nullptr); SmallVector NewBits(CurVal->getNumBits()); diff --git a/lib/TableGen/TGParser.h b/lib/TableGen/TGParser.h index ce31f8e6ab..6fd442a7c2 100644 --- a/lib/TableGen/TGParser.h +++ b/lib/TableGen/TGParser.h @@ -85,7 +85,7 @@ class TGParser { public: TGParser(SourceMgr &SrcMgr, RecordKeeper &records) - : Lex(SrcMgr), CurMultiClass(0), Records(records), AnonCounter(0) {} + : Lex(SrcMgr), CurMultiClass(nullptr), Records(records), AnonCounter(0) {} /// ParseFile - Main entrypoint for parsing a tblgen file. These parser /// routines return true on error, or false on success. @@ -131,7 +131,7 @@ private: // Semantic analysis methods. bool ProcessForeachDefs(Record *CurRec, SMLoc Loc, IterSet &IterVals); private: // Parser methods. - bool ParseObjectList(MultiClass *MC = 0); + bool ParseObjectList(MultiClass *MC = nullptr); bool ParseObject(MultiClass *MC); bool ParseClass(); bool ParseMultiClass(); @@ -169,12 +169,12 @@ private: // Parser methods. Init *ParseIDValue(Record *CurRec, const std::string &Name, SMLoc NameLoc, IDParseMode Mode = ParseValueMode); - Init *ParseSimpleValue(Record *CurRec, RecTy *ItemType = 0, + Init *ParseSimpleValue(Record *CurRec, RecTy *ItemType = nullptr, IDParseMode Mode = ParseValueMode); - Init *ParseValue(Record *CurRec, RecTy *ItemType = 0, + Init *ParseValue(Record *CurRec, RecTy *ItemType = nullptr, IDParseMode Mode = ParseValueMode); - std::vector ParseValueList(Record *CurRec, Record *ArgsRec = 0, - RecTy *EltTy = 0); + std::vector ParseValueList(Record *CurRec, Record *ArgsRec = nullptr, + RecTy *EltTy = nullptr); std::vector > ParseDagArgList(Record *); bool ParseOptionalRangeList(std::vector &Ranges); bool ParseOptionalBitList(std::vector &Ranges); -- cgit v1.2.3