Fix a GCC error from r223803

llvm-svn: 223814
This commit is contained in:
Duncan P. N. Exon Smith 2014-12-09 19:22:40 +00:00
parent a7f247ea56
commit a66e30517b
1 changed files with 5 additions and 3 deletions

View File

@ -2663,10 +2663,12 @@ 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::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);
}