forked from OSchip/llvm-project
It is possible that subprgoram definition is only encoding return value directly, instsad of an DIArray of all argument types.
llvm-svn: 65643
This commit is contained in:
parent
9723bcf60f
commit
843cc34d81
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue