mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
If subprogram type is not tagged as DW_TAG_subroutine_type then use it directly as a return value type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
094fad37b9
commit
75b2738d73
@ -1900,8 +1900,9 @@ private:
|
||||
DIArray Args = SPTy.getTypeArray();
|
||||
|
||||
// Add Return Type.
|
||||
unsigned SPTag = SPTy.getTag();
|
||||
if (!IsConstructor) {
|
||||
if (Args.isNull())
|
||||
if (Args.isNull() || SPTag != DW_TAG_subroutine_type)
|
||||
AddType(DW_Unit, SPDie, SPTy);
|
||||
else
|
||||
AddType(DW_Unit, SPDie, DIType(Args.getElement(0).getGV()));
|
||||
@ -1912,7 +1913,7 @@ private:
|
||||
// Add arguments.
|
||||
// Do not add arguments for subprogram definition. They will be
|
||||
// handled through RecordVariable.
|
||||
if (!Args.isNull())
|
||||
if (SPTag == DW_TAG_subroutine_type)
|
||||
for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) {
|
||||
DIE *Arg = new DIE(DW_TAG_formal_parameter);
|
||||
AddType(DW_Unit, Arg, DIType(Args.getElement(i).getGV()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user