diff options
author | Devang Patel <dpatel@apple.com> | 2009-02-24 00:52:19 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-02-24 00:52:19 +0000 |
commit | 002ec1482c83003c6aef841395271aa5993d916a (patch) | |
tree | 6b3d26553cb2d39a6cd5bc3fa2648bf75efa0414 /lib/CodeGen/AsmPrinter/DwarfWriter.cpp | |
parent | d1d1c8b3d5eae2de96fc83f2b807556f1b8f85b0 (diff) |
gdb uses DW_AT_prototyped to identify K&R style in C based languages.
This fixes objc.dg/dwarf-prototypes.m scan-assembler DW_AT_prototyped from llvmgcc42 test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfWriter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 6121d4bfa6..26973b1cb1 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -1942,6 +1942,11 @@ private: } } + unsigned Lang = SP.getCompileUnit().getLanguage(); + if (Lang == DW_LANG_C99 || Lang == DW_LANG_C89 + || Lang == DW_LANG_ObjC) + AddUInt(SPDie, DW_AT_prototyped, DW_FORM_flag, 1); + if (!SP.isLocalToUnit()) AddUInt(SPDie, DW_AT_external, DW_FORM_flag, 1); return SPDie; |