summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineDebugInfo.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-03-03 15:06:57 +0000
committerJim Laskey <jlaskey@mac.com>2006-03-03 15:06:57 +0000
commit88f0fe15a24b7caa22eef88366fc02cde9492e4c (patch)
tree6535e56723d24331415b442243860539a2076bb7 /llvm/lib/CodeGen/MachineDebugInfo.cpp
parent3bf916ddd984bf7613d4502aca86b1040594a8ed (diff)
downloadbcm5719-llvm-88f0fe15a24b7caa22eef88366fc02cde9492e4c.tar.gz
bcm5719-llvm-88f0fe15a24b7caa22eef88366fc02cde9492e4c.zip
Adding basic structure support.
llvm-svn: 26505
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineDebugInfo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineDebugInfo.cpp b/llvm/lib/CodeGen/MachineDebugInfo.cpp
index c5309417055..8e1d8f22c25 100644
--- a/llvm/lib/CodeGen/MachineDebugInfo.cpp
+++ b/llvm/lib/CodeGen/MachineDebugInfo.cpp
@@ -516,6 +516,7 @@ DebugInfoDesc *DebugInfoDesc::DescFactory(unsigned Tag) {
case DW_TAG_union_type:
case DW_TAG_enumeration_type: return new CompositeTypeDesc(Tag);
case DW_TAG_subrange_type: return new SubrangeDesc();
+ case DW_TAG_member: return new DerivedTypeDesc(DW_TAG_member);
case DW_TAG_enumerator: return new EnumeratorDesc();
default: break;
}
@@ -673,6 +674,7 @@ TypeDesc::TypeDesc(unsigned T)
, Name("")
, File(NULL)
, Size(0)
+, Offset(0)
{}
/// ApplyToFields - Target the visitor to the fields of the TypeDesc.
@@ -685,6 +687,7 @@ void TypeDesc::ApplyToFields(DIVisitor *Visitor) {
Visitor->Apply((DebugInfoDesc *&)File);
Visitor->Apply(Line);
Visitor->Apply(Size);
+ Visitor->Apply(Offset);
}
/// getDescString - Return a string used to compose global names and labels.
@@ -707,7 +710,8 @@ void TypeDesc::dump() {
<< "Name(\"" << Name << "\"), "
<< "File(" << File << "), "
<< "Line(" << Line << "), "
- << "Size(" << Size << ")\n";
+ << "Size(" << Size << "), "
+ << "Offset(" << Offset << ")\n";
}
#endif
@@ -771,6 +775,7 @@ bool DerivedTypeDesc::classof(const DebugInfoDesc *D) {
case DW_TAG_const_type:
case DW_TAG_volatile_type:
case DW_TAG_restrict_type:
+ case DW_TAG_member:
return true;
default: break;
}
OpenPOWER on IntegriCloud