[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineDebugInfo.cpp
Jim Laskey
jlaskey at apple.com
Tue Jun 20 12:41:19 PDT 2006
Changes in directory llvm/lib/CodeGen:
DwarfWriter.cpp updated: 1.65 -> 1.66
MachineDebugInfo.cpp updated: 1.43 -> 1.44
---
Log message:
Add support for function types.
---
Diffs of the changes: (+20 -1)
DwarfWriter.cpp | 17 +++++++++++++++++
MachineDebugInfo.cpp | 4 +++-
2 files changed, 20 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.65 llvm/lib/CodeGen/DwarfWriter.cpp:1.66
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.65 Mon Jun 19 14:49:42 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp Tue Jun 20 14:41:06 2006
@@ -1402,6 +1402,23 @@
break;
}
+ case DW_TAG_subroutine_type: {
+ // Add prototype flag.
+ Ty->AddUInt(DW_AT_prototyped, DW_FORM_flag, 1);
+ // Add return type.
+ Ty->AddDIEntry(DW_AT_type, DW_FORM_ref4,
+ NewType(Context, cast<TypeDesc>(Elements[0]), Unit));
+
+ // Add arguments.
+ for(unsigned i = 1, N = Elements.size(); i < N; ++i) {
+ DIE *Arg = new DIE(DW_TAG_formal_parameter);
+ Arg->AddDIEntry(DW_AT_type, DW_FORM_ref4,
+ NewType(Context, cast<TypeDesc>(Elements[i]), Unit));
+ Ty->AddChild(Arg);
+ }
+
+ break;
+ }
default: break;
}
}
Index: llvm/lib/CodeGen/MachineDebugInfo.cpp
diff -u llvm/lib/CodeGen/MachineDebugInfo.cpp:1.43 llvm/lib/CodeGen/MachineDebugInfo.cpp:1.44
--- llvm/lib/CodeGen/MachineDebugInfo.cpp:1.43 Mon Jun 19 07:54:15 2006
+++ llvm/lib/CodeGen/MachineDebugInfo.cpp Tue Jun 20 14:41:06 2006
@@ -493,7 +493,8 @@
case DW_TAG_structure_type:
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
- case DW_TAG_vector_type: return new CompositeTypeDesc(Tag);
+ case DW_TAG_vector_type:
+ case DW_TAG_subroutine_type: return new CompositeTypeDesc(Tag);
case DW_TAG_subrange_type: return new SubrangeDesc();
case DW_TAG_enumerator: return new EnumeratorDesc();
case DW_TAG_return_variable:
@@ -831,6 +832,7 @@
case DW_TAG_union_type:
case DW_TAG_enumeration_type:
case DW_TAG_vector_type:
+ case DW_TAG_subroutine_type:
return true;
default: break;
}
More information about the llvm-commits
mailing list