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 | 8c05fd42b5b61bef47e5ac90d2e01e6cbe248ac6 (patch) | |
tree | 1d6b5a0410e796c8cd17a27c8cf41ebda86364d5 | |
parent | 34ddd8145c4c02d31e11d3eace357e87d8ea51c7 (diff) | |
download | external_llvm-8c05fd42b5b61bef47e5ac90d2e01e6cbe248ac6.zip external_llvm-8c05fd42b5b61bef47e5ac90d2e01e6cbe248ac6.tar.gz external_llvm-8c05fd42b5b61bef47e5ac90d2e01e6cbe248ac6.tar.bz2 |
Line number 0 indicates there is no source line/file name info available for this construct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116061 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 74fe864..2c0aeb7 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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(); |