diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-11-15 19:53:23 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-11-15 19:53:23 +0000 |
commit | fc0fea0251c1941fd6bd4d6b0c81efd6cc65da30 (patch) | |
tree | 84153fab02eb98e7ec1e6a7092004c4c33e706e9 /llvm | |
parent | ddb573063d4a0b62d007768e3de60fcb21575b26 (diff) | |
download | bcm5719-llvm-fc0fea0251c1941fd6bd4d6b0c81efd6cc65da30.tar.gz bcm5719-llvm-fc0fea0251c1941fd6bd4d6b0c81efd6cc65da30.zip |
Restore the behaviour from before r194728.
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie.
llvm-svn: 194843
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index ee3735cff5a..e399508bb94 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -871,7 +871,9 @@ DIE *CompileUnit::getOrCreateContextDIE(DIScope Context) { return getOrCreateNameSpace(DINameSpace(Context)); if (Context.isSubprogram()) return getOrCreateSubprogramDIE(DISubprogram(Context)); - return getDIE(Context); + if (DIE *ContextDIE = getDIE(Context)) + return ContextDIE; + return getCUDie(); } /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the |