From: David Blaikie Date: Mon, 2 Jun 2014 16:32:05 +0000 (+0000) Subject: CGDebugInfo: Simplify/invert createLexicalBlock parameter construction. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9ea242d4fd48bec2a3f244dc60460d8a4bce539;p=platform%2Fupstream%2Fllvm.git CGDebugInfo: Simplify/invert createLexicalBlock parameter construction. llvm-svn: 210033 --- diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e2ba70a..4ac1011 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2579,14 +2579,11 @@ void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc, /// CreateLexicalBlock - Creates a new lexical block node and pushes it on /// the stack. void CGDebugInfo::CreateLexicalBlock(SourceLocation Loc) { - llvm::DIDescriptor D = - DBuilder.createLexicalBlock(LexicalBlockStack.empty() ? - llvm::DIDescriptor() : - llvm::DIDescriptor(LexicalBlockStack.back()), - getOrCreateFile(CurLoc), - getLineNumber(CurLoc), - getColumnNumber(CurLoc), - 0); + llvm::DIDescriptor D = DBuilder.createLexicalBlock( + llvm::DIDescriptor(LexicalBlockStack.empty() ? nullptr + : LexicalBlockStack.back()), + getOrCreateFile(CurLoc), getLineNumber(CurLoc), getColumnNumber(CurLoc), + 0); llvm::MDNode *DN = D; LexicalBlockStack.push_back(DN); }