[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineDebugInfo.cpp
Jim Laskey
jlaskey at apple.com
Thu Jun 15 13:51:59 PDT 2006
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.61 -> 1.62
MachineDebugInfo.cpp updated: 1.40 -> 1.41
---
Log message:
1. Support standard dwarf format (was bootstrapping in Apple format.)
2. Add vector support.
---
Diffs of the changes: (+14 -4)
DwarfWriter.cpp | 16 ++++++++++++----
MachineDebugInfo.cpp | 2 ++
2 files changed, 14 insertions(+), 4 deletions(-)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.61 llvm/lib/CodeGen/DwarfWriter.cpp:1.62
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.61 Wed Jun 14 06:35:03 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp Thu Jun 15 15:51:43 2006
@@ -1265,7 +1265,7 @@
// Fundamental types like int, float, bool
Slot = Ty = new DIE(DW_TAG_base_type);
unsigned Encoding = BasicTy->getEncoding();
- Ty->AddUInt (DW_AT_encoding, DW_FORM_data1, Encoding);
+ Ty->AddUInt(DW_AT_encoding, DW_FORM_data1, Encoding);
} else if (DerivedTypeDesc *DerivedTy = dyn_cast<DerivedTypeDesc>(TyDesc)) {
// Create specific DIE.
Slot = Ty = new DIE(DerivedTy->getTag());
@@ -1287,6 +1287,12 @@
Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4,
NewType(Context, FromTy, Unit));
}
+
+ // check for vector type
+ if (CompTy->isVector()) {
+ Ty->AddUInt(DW_AT_GNU_vector, DW_FORM_flag, 1);
+ }
+
// Don't emit size attribute.
Size = 0;
@@ -1419,7 +1425,8 @@
unsigned ID) {
// Construct debug information entry.
DIE *Die = new DIE(DW_TAG_compile_unit);
- Die->AddLabel (DW_AT_stmt_list, DW_FORM_data4, DWLabel("line", 0));
+ Die->AddDelta (DW_AT_stmt_list, DW_FORM_data4, DWLabel("line", 0),
+ DWLabel("section_line", 0));
Die->AddLabel (DW_AT_high_pc, DW_FORM_addr, DWLabel("text_end", 0));
Die->AddLabel (DW_AT_low_pc, DW_FORM_addr, DWLabel("text_begin", 0));
Die->AddString(DW_AT_producer, DW_FORM_string, UnitDesc->getProducer());
@@ -1842,7 +1849,7 @@
int stackGrowth =
Asm->TM.getFrameInfo()->getStackGrowthDirection() ==
TargetFrameInfo::StackGrowsUp ?
- AddressSize : -AddressSize;
+ AddressSize : -AddressSize;
EmitULEB128Bytes(Src.getOffset() / stackGrowth);
EOL("Offset");
@@ -1875,7 +1882,8 @@
EmitInt32(ContentSize); EOL("Length of Compilation Unit Info");
EmitInt16(DWARF_VERSION); EOL("DWARF version number");
- EmitReference("abbrev_begin", 0); EOL("Offset Into Abbrev. Section");
+ EmitDifference("abbrev_begin", 0, "section_abbrev", 0);
+ EOL("Offset Into Abbrev. Section");
EmitInt8(AddressSize); EOL("Address Size (in bytes)");
EmitDIE(Die);
Index: llvm/lib/CodeGen/MachineDebugInfo.cpp
diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.40 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.41
--- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.40 Wed Jun 14 09:45:39 2006
+++ llvm/lib/CodeGen/MachineDebugInfo.cpp Thu Jun 15 15:51:43 2006
@@ -817,6 +817,7 @@
CompositeTypeDesc::CompositeTypeDesc(unsigned T)
: DerivedTypeDesc(T)
+, IsVector(false)
, Elements()
{}
@@ -839,6 +840,7 @@
void CompositeTypeDesc::ApplyToFields(DIVisitor *Visitor) {
DerivedTypeDesc::ApplyToFields(Visitor);
+ Visitor->Apply(IsVector);
Visitor->Apply(Elements);
}
More information about the llvm-commits
mailing list