diff options
| author | Devang Patel <dpatel@apple.com> | 2009-02-10 06:04:08 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-02-10 06:04:08 +0000 |
| commit | 9b6c1d6313035a11651c5c74f6cc1e354bdb2985 (patch) | |
| tree | 4e34fe5b25b49a867700d53c7255d9e0b0436d18 /llvm/lib/CodeGen | |
| parent | 33747b6c41bdde751a237108bb6774acdedb2ff8 (diff) | |
| download | bcm5719-llvm-9b6c1d6313035a11651c5c74f6cc1e354bdb2985.tar.gz bcm5719-llvm-9b6c1d6313035a11651c5c74f6cc1e354bdb2985.zip | |
Validate file id.
llvm-svn: 64204
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index b12b35b1107..1265b990377 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -1554,6 +1554,7 @@ private: unsigned Line = V->getLineNumber(); CompileUnit *Unit = FindCompileUnit(V->getCompileUnit()); FileID = Unit->getID(); + assert (FileID && "Invalid file id"); AddUInt(Die, DW_AT_decl_file, 0, FileID); AddUInt(Die, DW_AT_decl_line, 0, Line); } @@ -1565,6 +1566,7 @@ private: unsigned Line = G->getLineNumber(); CompileUnit *Unit = FindCompileUnit(G->getCompileUnit()); FileID = Unit->getID(); + assert (FileID && "Invalid file id"); AddUInt(Die, DW_AT_decl_file, 0, FileID); AddUInt(Die, DW_AT_decl_line, 0, Line); } @@ -1577,6 +1579,7 @@ private: return; CompileUnit *Unit = FindCompileUnit(CU); FileID = Unit->getID(); + assert (FileID && "Invalid file id"); AddUInt(Die, DW_AT_decl_file, 0, FileID); AddUInt(Die, DW_AT_decl_line, 0, Line); } |

