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 | 7d5f2bd5f9615c0f20d3a1f75ec01452d813283b (patch) | |
tree | 9bacce3d0ea6de4992096763e472d85a2fe85ac2 /lib | |
parent | cc7052343e5e955d4e2f48885c06360f9003390a (diff) | |
download | external_llvm-7d5f2bd5f9615c0f20d3a1f75ec01452d813283b.zip external_llvm-7d5f2bd5f9615c0f20d3a1f75ec01452d813283b.tar.gz external_llvm-7d5f2bd5f9615c0f20d3a1f75ec01452d813283b.tar.bz2 |
Restore the behaviour from before r194728.
If getDIE() fails, getOrCreateContextDIE() should also return the CUDie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index ee3735c..e399508 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/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 |