[llvm-commits] [llvm] r65358 - /llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Bill Wendling isanbard at gmail.com
Mon Feb 23 17:14:23 PST 2009


Author: void
Date: Mon Feb 23 19:14:23 2009
New Revision: 65358

URL: http://llvm.org/viewvc/llvm-project?rev=65358&view=rev
Log:
--- Merging (from foreign repository) r65357 into '.':
U    lib/CodeGen/AsmPrinter/DwarfWriter.cpp

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/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Modified: llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=65358&r1=65357&r2=65358&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Feb 23 19:14:23 2009
@@ -1939,6 +1939,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