diff options
author | Eric Christopher <echristo@apple.com> | 2012-03-15 23:55:40 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-03-15 23:55:40 +0000 |
commit | 2125d5a7e58eb21f34c2a21913d6f1074c63b5cd (patch) | |
tree | 1bba7e7c0e7e04ad6c2d66a8d9cff31d54d59990 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 89eaa6f554c362799a86ca50bdbaab72402565d2 (diff) |
For types with a parent of the compile unit make sure and emit
the DECL information.
rdar://10855921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152876 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 389ae46b64..3b383f678c 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -156,13 +156,12 @@ void CompileUnit::addSourceLine(DIE *Die, DISubprogram SP) { // Verify subprogram. if (!SP.Verify()) return; - // If the line number is 0, don't add it. - if (SP.getLineNumber() == 0) - return; + // If the line number is 0, don't add it. unsigned Line = SP.getLineNumber(); - if (!SP.getContext().Verify()) + if (Line == 0) return; + unsigned FileID = DD->GetOrCreateSourceID(SP.getFilename(), SP.getDirectory()); assert(FileID && "Invalid file id"); @@ -178,7 +177,7 @@ void CompileUnit::addSourceLine(DIE *Die, DIType Ty) { return; unsigned Line = Ty.getLineNumber(); - if (Line == 0 || !Ty.getContext().Verify()) + if (Line == 0) return; unsigned FileID = DD->GetOrCreateSourceID(Ty.getFilename(), Ty.getDirectory()); |