diff options
author | Devang Patel <dpatel@apple.com> | 2010-10-08 17:18:54 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-10-08 17:18:54 +0000 |
commit | dd1c289a6af5e2955fae6e33c790a1360755cc3a (patch) | |
tree | 80351208913a2a6d340d0abe2f1e71da36a0b59d /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 5e8ee2bb89c947934b615a9a08b6daafec9833f5 (diff) | |
download | bcm5719-llvm-dd1c289a6af5e2955fae6e33c790a1360755cc3a.tar.gz bcm5719-llvm-dd1c289a6af5e2955fae6e33c790a1360755cc3a.zip |
Line number 0 indicates there is no source line/file name info available for this construct.
llvm-svn: 116061
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 74fe8643ab3..2c0aeb7e014 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -507,6 +507,8 @@ void DwarfDebug::addSourceLine(DIE *Die, DIVariable V) { return; unsigned Line = V.getLineNumber(); + if (Line == 0) + return; unsigned FileID = GetOrCreateSourceID(V.getContext().getDirectory(), V.getContext().getFilename()); assert(FileID && "Invalid file id"); @@ -522,6 +524,8 @@ void DwarfDebug::addSourceLine(DIE *Die, DIGlobalVariable G) { return; unsigned Line = G.getLineNumber(); + if (Line == 0) + return; unsigned FileID = GetOrCreateSourceID(G.getContext().getDirectory(), G.getContext().getFilename()); assert(FileID && "Invalid file id"); @@ -557,7 +561,7 @@ void DwarfDebug::addSourceLine(DIE *Die, DIType Ty) { return; unsigned Line = Ty.getLineNumber(); - if (!Ty.getContext().Verify()) + if (Line == 0 || !Ty.getContext().Verify()) return; unsigned FileID = GetOrCreateSourceID(Ty.getContext().getDirectory(), Ty.getContext().getFilename()); @@ -574,6 +578,8 @@ void DwarfDebug::addSourceLine(DIE *Die, DINameSpace NS) { return; unsigned Line = NS.getLineNumber(); + if (Line == 0) + return; StringRef FN = NS.getFilename(); StringRef Dir = NS.getDirectory(); |