[llvm-commits] [llvm] r65643 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Devang Patel
dpatel at apple.com
Fri Feb 27 10:05:21 PST 2009
Author: dpatel
Date: Fri Feb 27 12:05:21 2009
New Revision: 65643
URL: http://llvm.org/viewvc/llvm-project?rev=65643&view=rev
Log:
It is possible that subprgoram definition is only encoding return value directly, instsad of an DIArray of all argument types.
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=65643&r1=65642&r2=65643&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Feb 27 12:05:21 2009
@@ -1888,8 +1888,12 @@
DIArray Args = SPTy.getTypeArray();
// Add Return Type.
- if (!IsConstructor)
- AddType(DW_Unit, SPDie, DIType(Args.getElement(0).getGV()));
+ if (!IsConstructor) {
+ if (Args.isNull())
+ AddType(DW_Unit, SPDie, SPTy);
+ else
+ AddType(DW_Unit, SPDie, DIType(Args.getElement(0).getGV()));
+ }
if (!SP.isDefinition()) {
AddUInt(SPDie, DW_AT_declaration, DW_FORM_flag, 1);
More information about the llvm-commits
mailing list