diff options
author | Devang Patel <dpatel@apple.com> | 2009-02-27 18:05:21 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-02-27 18:05:21 +0000 |
commit | 9ac08d6a67a66c4f5deea23f152629756defcaf1 (patch) | |
tree | 9672ba919d4f2c2bb2eaf157b293942d4992c8c3 | |
parent | a05764c4fb1ff4fc6013dcfd71fc83fb25cdcd27 (diff) | |
download | external_llvm-9ac08d6a67a66c4f5deea23f152629756defcaf1.zip external_llvm-9ac08d6a67a66c4f5deea23f152629756defcaf1.tar.gz external_llvm-9ac08d6a67a66c4f5deea23f152629756defcaf1.tar.bz2 |
It is possible that subprgoram definition is only encoding return value directly, instsad of an DIArray of all argument types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65643 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index cab6315..5c4957a 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -1888,8 +1888,12 @@ private: 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); |