mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Address review comments for r202188.
This is refactoring / simplifying code, updating comments and enabling the testcase on non-x86 platforms. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202199 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1141,18 +1141,18 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DIDerivedType DTy) {
|
||||
|
||||
/// constructSubprogramArguments - Construct function argument DIEs.
|
||||
void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DIArray Args) {
|
||||
for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) {
|
||||
DIDescriptor Ty = Args.getElement(i);
|
||||
if (Ty.isUnspecifiedParameter()) {
|
||||
assert(i == N-1 && "ellipsis must be the last argument");
|
||||
createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer);
|
||||
} else {
|
||||
DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer);
|
||||
addType(Arg, DIType(Ty));
|
||||
if (DIType(Ty).isArtificial())
|
||||
addFlag(Arg, dwarf::DW_AT_artificial);
|
||||
}
|
||||
for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) {
|
||||
DIDescriptor Ty = Args.getElement(i);
|
||||
if (Ty.isUnspecifiedParameter()) {
|
||||
assert(i == N-1 && "Unspecified parameter must be the last argument");
|
||||
createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer);
|
||||
} else {
|
||||
DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer);
|
||||
addType(Arg, DIType(Ty));
|
||||
if (DIType(Ty).isArtificial())
|
||||
addFlag(Arg, dwarf::DW_AT_artificial);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// constructTypeDIE - Construct type DIE from DICompositeType.
|
||||
|
Reference in New Issue
Block a user