r223814 - Fix a GCC error from r223803
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Dec 9 11:22:40 PST 2014
Author: dexonsmith
Date: Tue Dec 9 13:22:40 2014
New Revision: 223814
URL: http://llvm.org/viewvc/llvm-project?rev=223814&view=rev
Log:
Fix a GCC error from r223803
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=223814&r1=223813&r2=223814&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Dec 9 13:22:40 2014
@@ -2663,10 +2663,12 @@ void CGDebugInfo::EmitLocation(CGBuilder
/// CreateLexicalBlock - Creates a new lexical block node and pushes it on
/// the stack.
void CGDebugInfo::CreateLexicalBlock(SourceLocation Loc) {
+ llvm::MDNode *Back = nullptr;
+ if (!LexicalBlockStack.empty())
+ Back = LexicalBlockStack.back().get();
llvm::DIDescriptor D = DBuilder.createLexicalBlock(
- llvm::DIDescriptor(LexicalBlockStack.empty() ? nullptr
- : LexicalBlockStack.back()),
- getOrCreateFile(CurLoc), getLineNumber(CurLoc), getColumnNumber(CurLoc));
+ llvm::DIDescriptor(Back), getOrCreateFile(CurLoc), getLineNumber(CurLoc),
+ getColumnNumber(CurLoc));
llvm::MDNode *DN = D;
LexicalBlockStack.emplace_back(DN);
}
More information about the cfe-commits
mailing list