]> granicus.if.org Git - clang/commitdiff
CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 2 Jun 2014 16:32:05 +0000 (16:32 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 2 Jun 2014 16:32:05 +0000 (16:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210033 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index e2ba70ac549a28ed1ff52238e5ce8feff9301a9e..4ac1011385c4c9db5b361760da15ecfda5401d35 100644 (file)
@@ -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);
 }