r210033 - CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.

David Blaikie dblaikie at gmail.com
Mon Jun 2 09:32:05 PDT 2014


Author: dblaikie
Date: Mon Jun  2 11:32:05 2014
New Revision: 210033

URL: http://llvm.org/viewvc/llvm-project?rev=210033&view=rev
Log:
CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=210033&r1=210032&r2=210033&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Jun  2 11:32:05 2014
@@ -2579,14 +2579,11 @@ void CGDebugInfo::EmitLocation(CGBuilder
 /// 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);
 }





More information about the cfe-commits mailing list