diff options
author | Devang Patel <dpatel@apple.com> | 2010-10-06 20:50:40 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-10-06 20:50:40 +0000 |
commit | d6747df5e0354256a9e440d38f21c0b3ca82af28 (patch) | |
tree | 493a9d6200484b104136720fece7f949127ffa2a /lib/CodeGen | |
parent | 7cd2729d2a2ded13ba35f85575b64383f198f976 (diff) | |
download | external_llvm-d6747df5e0354256a9e440d38f21c0b3ca82af28.zip external_llvm-d6747df5e0354256a9e440d38f21c0b3ca82af28.tar.gz external_llvm-d6747df5e0354256a9e440d38f21c0b3ca82af28.tar.bz2 |
Add support for DW_TAG_unspecified_parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index ddda184..b2ae1a2 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1042,16 +1042,25 @@ void DwarfDebug::constructTypeDIE(DIE &Buffer, DICompositeType CTy) { DIDescriptor RTy = Elements.getElement(0); addType(&Buffer, DIType(RTy)); - // Add prototype flag. - addUInt(&Buffer, dwarf::DW_AT_prototyped, dwarf::DW_FORM_flag, 1); - + bool isPrototyped = true; // Add arguments. for (unsigned i = 1, N = Elements.getNumElements(); i < N; ++i) { - DIE *Arg = new DIE(dwarf::DW_TAG_formal_parameter); DIDescriptor Ty = Elements.getElement(i); - addType(Arg, DIType(Ty)); - Buffer.addChild(Arg); + if (Ty.isUnspecifiedParameter()) { + DIE *Arg = new DIE(dwarf::DW_TAG_unspecified_parameters); + Buffer.addChild(Arg); + isPrototyped = false; + } else { + DIE *Arg = new DIE(dwarf::DW_TAG_formal_parameter); + addType(Arg, DIType(Ty)); + Buffer.addChild(Arg); + } } + // Add prototype flag. + if (isPrototyped) + addUInt(&Buffer, dwarf::DW_AT_prototyped, dwarf::DW_FORM_flag, 1); + + } break; case dwarf::DW_TAG_structure_type: |