[llvm-commits] [llvm] r64204 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Devang Patel
dpatel at apple.com
Mon Feb 9 22:04:08 PST 2009
Author: dpatel
Date: Tue Feb 10 00:04:08 2009
New Revision: 64204
URL: http://llvm.org/viewvc/llvm-project?rev=64204&view=rev
Log:
Validate file id.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=64204&r1=64203&r2=64204&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Tue Feb 10 00:04:08 2009
@@ -1554,6 +1554,7 @@
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 @@
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 @@
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);
}
More information about the llvm-commits
mailing list