From c10719f55d3babe47ce754ad4e4964c7cd90d6e8 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 7 Apr 2014 04:17:22 +0000 Subject: [C++11] Make use of 'nullptr' in the Support library. llvm-svn: 205697 --- llvm/lib/Support/SourceMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support/SourceMgr.cpp') diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index 4bfd96abe5b..4aa6ff7d31e 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -114,7 +114,7 @@ SourceMgr::getLineAndColumn(SMLoc Loc, int BufferID) const { if (*Ptr == '\n') ++LineNo; // Allocate the line number cache if it doesn't exist. - if (LineNoCache == 0) + if (LineNoCache == nullptr) LineNoCache = new LineNoCacheTy(); // Update the line # cache. @@ -228,7 +228,7 @@ void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, PrintIncludeStack(getBufferInfo(CurBuf).IncludeLoc, OS); } - Diagnostic.print(0, OS, ShowColors); + Diagnostic.print(nullptr, OS, ShowColors); } void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, -- cgit v1.2.3