From f9ea242d4fd48bec2a3f244dc60460d8a4bce539 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 2 Jun 2014 16:32:05 +0000 Subject: [PATCH] CGDebugInfo: Simplify/invert createLexicalBlock parameter construction. llvm-svn: 210033 --- clang/lib/CodeGen/CGDebugInfo.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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); } -- 2.7.4