[llvm-commits] [llvm] r65357 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Devang Patel
dpatel at apple.com
Mon Feb 23 16:52:19 PST 2009
Author: dpatel
Date: Mon Feb 23 18:52:19 2009
New Revision: 65357
URL: http://llvm.org/viewvc/llvm-project?rev=65357&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=65357&r1=65356&r2=65357&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Feb 23 18:52:19 2009
@@ -1942,6 +1942,11 @@
}
}
+ 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;
More information about the llvm-commits
mailing list