summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-05-07 23:33:41 +0000
committerDevang Patel <dpatel@apple.com>2010-05-07 23:33:41 +0000
commit0625af2a888e9603bfded090da6f4cff17460d14 (patch)
tree0e68195debf55c03da50508e6cb5cf0e2353ffa9 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentcbe7a8508affa6e0ff4b3639142f7f063a40691d (diff)
downloadbcm5719-llvm-0625af2a888e9603bfded090da6f4cff17460d14.tar.gz
bcm5719-llvm-0625af2a888e9603bfded090da6f4cff17460d14.zip
Instead of just verifying compile unit, verify entire type, variable, namespace etc..
llvm-svn: 103327
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index e319c289325..7a403037788 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -448,8 +448,8 @@ void DwarfDebug::addBlock(DIE *Die, unsigned Attribute, unsigned Form,
/// addSourceLine - Add location information to specified debug information
/// entry.
void DwarfDebug::addSourceLine(DIE *Die, const DIVariable *V) {
- // If there is no compile unit specified, don't add a line #.
- if (!V->getCompileUnit().Verify())
+ // Verify variable.
+ if (!V->Verify())
return;
unsigned Line = V->getLineNumber();
@@ -463,8 +463,8 @@ void DwarfDebug::addSourceLine(DIE *Die, const DIVariable *V) {
/// addSourceLine - Add location information to specified debug information
/// entry.
void DwarfDebug::addSourceLine(DIE *Die, const DIGlobalVariable *G) {
- // If there is no compile unit specified, don't add a line #.
- if (!G->getCompileUnit().Verify())
+ // Verify global variable.
+ if (!G->Verify())
return;
unsigned Line = G->getLineNumber();
@@ -478,8 +478,8 @@ void DwarfDebug::addSourceLine(DIE *Die, const DIGlobalVariable *G) {
/// addSourceLine - Add location information to specified debug information
/// entry.
void DwarfDebug::addSourceLine(DIE *Die, const DISubprogram *SP) {
- // If there is no compile unit specified, don't add a line #.
- if (!SP->getCompileUnit().Verify())
+ // Verify subprogram.
+ if (!SP->Verify())
return;
// If the line number is 0, don't add it.
if (SP->getLineNumber() == 0)
@@ -498,9 +498,8 @@ void DwarfDebug::addSourceLine(DIE *Die, const DISubprogram *SP) {
/// addSourceLine - Add location information to specified debug information
/// entry.
void DwarfDebug::addSourceLine(DIE *Die, const DIType *Ty) {
- // If there is no compile unit specified, don't add a line #.
- DICompileUnit CU = Ty->getCompileUnit();
- if (!CU.Verify())
+ // Verify type.
+ if (!Ty->Verify())
return;
unsigned Line = Ty->getLineNumber();
@@ -516,8 +515,8 @@ void DwarfDebug::addSourceLine(DIE *Die, const DIType *Ty) {
/// addSourceLine - Add location information to specified debug information
/// entry.
void DwarfDebug::addSourceLine(DIE *Die, const DINameSpace *NS) {
- // If there is no compile unit specified, don't add a line #.
- if (!NS->getCompileUnit().Verify())
+ // Verify namespace.
+ if (!NS->Verify())
return;
unsigned Line = NS->getLineNumber();
OpenPOWER on IntegriCloud