aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-06-16 13:14:03 +0000
committerJim Laskey <jlaskey@mac.com>2006-06-16 13:14:03 +0000
commit7089f45987728197e80174e7640f0178d688080e (patch)
tree2aca7b09d24cfca5420cc7eb81a14b21df103a37 /lib/CodeGen/DwarfWriter.cpp
parent21abac2757087358249eec702ba93f1dde656cf2 (diff)
1. Revise vector debug support.
2. Update docs for vector debug support and new version control. 3. Simplify serialization of DebugDescInfo subclasses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28816 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/DwarfWriter.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index 7805bbcbbf..b384b416a4 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/lib/CodeGen/DwarfWriter.cpp
@@ -1276,11 +1276,18 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) {
NewType(Context, FromTy, Unit));
}
} else if (CompositeTypeDesc *CompTy = dyn_cast<CompositeTypeDesc>(TyDesc)) {
+ // Fetch tag
+ unsigned Tag = CompTy->getTag();
+
// Create specific DIE.
- Slot = Ty = new DIE(CompTy->getTag());
+ Slot = Ty = Tag == DW_TAG_vector_type ? new DIE(DW_TAG_array_type) :
+ new DIE(Tag);
+
std::vector<DebugInfoDesc *> &Elements = CompTy->getElements();
- switch (CompTy->getTag()) {
+ switch (Tag) {
+ case DW_TAG_vector_type: Ty->AddUInt(DW_AT_GNU_vector, DW_FORM_flag, 1);
+ // Fall thru
case DW_TAG_array_type: {
// Add element type.
if (TypeDesc *FromTy = CompTy->getFromType()) {
@@ -1288,11 +1295,6 @@ DIE *DwarfWriter::NewType(DIE *Context, TypeDesc *TyDesc, CompileUnit *Unit) {
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;