summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-15 19:34:26 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-15 19:34:26 +0000
commit5379c6930dc7b3ddb93a42384474cc0e65f7e4c5 (patch)
tree56304175728fb05921eed9890291122baca6671c /lib/CodeGen
parentcc3f31aec5d3532e55df5c1392344b73067ed526 (diff)
downloadllvm-5379c6930dc7b3ddb93a42384474cc0e65f7e4c5.tar.gz
llvm-5379c6930dc7b3ddb93a42384474cc0e65f7e4c5.tar.bz2
llvm-5379c6930dc7b3ddb93a42384474cc0e65f7e4c5.tar.xz
PR20038: DebugInfo missing DIEs for some concrete variables.
I haven't nailed this down entirely, but this is about as small of a test case as I can seem to construct and adequately demonstrates the crasher. I'll continue investigating the root cause/fix(es). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 2269686d2e..a88aebd2d2 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -786,6 +786,9 @@ void DwarfDebug::beginModule() {
void DwarfDebug::finishVariableDefinitions() {
for (const auto &Var : ConcreteVariables) {
DIE *VariableDie = Var->getDIE();
+ // FIXME: There shouldn't be any variables without DIEs.
+ if (!VariableDie)
+ continue;
// FIXME: Consider the time-space tradeoff of just storing the unit pointer
// in the ConcreteVariables list, rather than looking it up again here.
// DIE::getUnit isn't simple - it walks parent pointers, etc.