summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-02 16:32:05 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-02 16:32:05 +0000
commit2fd209633568ce58700938a60f4582c45e83a90e (patch)
tree34bfc7dfddba58a915713d5b476c1d0273870c3d /lib/CodeGen/CGDebugInfo.cpp
parentf36b6747fafc1fe874d4000d9788f2fba81de744 (diff)
downloadclang-2fd209633568ce58700938a60f4582c45e83a90e.tar.gz
clang-2fd209633568ce58700938a60f4582c45e83a90e.tar.bz2
clang-2fd209633568ce58700938a60f4582c45e83a90e.tar.xz
CGDebugInfo: Simplify/invert createLexicalBlock parameter construction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index e2ba70ac54..4ac1011385 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/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);
}