summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-12-09 19:22:40 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-12-09 19:22:40 +0000
commita66e30517b8530f19b94caf96105d75d08e2db9f (patch)
tree47befbdba0f7f821fd77ab2a7d7484ac44a1cb4a /clang/lib/CodeGen
parenta7f247ea56ef8b0b55d9366e6180331c51aaf83d (diff)
downloadbcm5719-llvm-a66e30517b8530f19b94caf96105d75d08e2db9f.tar.gz
bcm5719-llvm-a66e30517b8530f19b94caf96105d75d08e2db9f.zip
Fix a GCC error from r223803
llvm-svn: 223814
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 20603f44afb..5bf460f2b82 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -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);
}
OpenPOWER on IntegriCloud