[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Jim Laskey
jlaskey at apple.com
Mon Jan 8 14:15:33 PST 2007
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.110 -> 1.111
---
Log message:
Need to handle static declarations properly.
---
Diffs of the changes: (+9 -6)
DwarfWriter.cpp | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.110 llvm/lib/CodeGen/DwarfWriter.cpp:1.111
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.110 Wed Jan 3 07:36:40 2007
+++ llvm/lib/CodeGen/DwarfWriter.cpp Mon Jan 8 16:15:18 2007
@@ -1614,7 +1614,8 @@
AddType(Static, StaticTy, Unit);
// Add flags.
- AddUInt(Static, DW_AT_external, DW_FORM_flag, 1);
+ if (!StaticDesc->isStatic())
+ AddUInt(Static, DW_AT_external, DW_FORM_flag, 1);
AddUInt(Static, DW_AT_declaration, DW_FORM_flag, 1);
Buffer.AddChild(Static);
@@ -1662,7 +1663,8 @@
}
// Add flags.
- AddUInt(Method, DW_AT_external, DW_FORM_flag, 1);
+ if (!MethodDesc->isStatic())
+ AddUInt(Method, DW_AT_external, DW_FORM_flag, 1);
AddUInt(Method, DW_AT_declaration, DW_FORM_flag, 1);
Buffer.AddChild(Method);
@@ -1773,8 +1775,9 @@
AddString(VariableDie, DW_AT_MIPS_linkage_name, DW_FORM_string,
LinkageName);
}
- AddType(VariableDie, GVD->getType(), Unit);
- AddUInt(VariableDie, DW_AT_external, DW_FORM_flag, 1);
+ AddType(VariableDie, GVD->getType(), Unit);
+ if (!GVD->isStatic())
+ AddUInt(VariableDie, DW_AT_external, DW_FORM_flag, 1);
// Add source line info if available.
AddSourceLine(VariableDie, UnitDesc, GVD->getLine());
@@ -1814,7 +1817,6 @@
const std::string &Name = SPD->getName();
const std::string &FullName = SPD->getFullName();
const std::string &LinkageName = SPD->getLinkageName();
- unsigned IsExternal = SPD->isStatic() ? 0 : 1;
DIE *SubprogramDie = new DIE(DW_TAG_subprogram);
AddString(SubprogramDie, DW_AT_name, DW_FORM_string, Name);
@@ -1823,7 +1825,8 @@
LinkageName);
}
if (SPD->getType()) AddType(SubprogramDie, SPD->getType(), Unit);
- AddUInt(SubprogramDie, DW_AT_external, DW_FORM_flag, IsExternal);
+ if (!SPD->isStatic())
+ AddUInt(SubprogramDie, DW_AT_external, DW_FORM_flag, 1);
AddUInt(SubprogramDie, DW_AT_prototyped, DW_FORM_flag, 1);
// Add source line info if available.
More information about the llvm-commits
mailing list