summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-02-24 00:52:19 +0000
committerDevang Patel <dpatel@apple.com>2009-02-24 00:52:19 +0000
commit50c632411939e318dbb308f4a17578c674871cc0 (patch)
treea2d8906d3c9081f5b71f410c2ef312e8aab14405 /llvm/lib/CodeGen
parent98bac99265c29d67ace8bc5039cbdf9613e2592a (diff)
downloadbcm5719-llvm-50c632411939e318dbb308f4a17578c674871cc0.tar.gz
bcm5719-llvm-50c632411939e318dbb308f4a17578c674871cc0.zip
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. llvm-svn: 65357
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 6121d4bfa66..26973b1cb15 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud