mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
[Debug Info] remove DITrivialType and use null to represent unspecified param.
Per feedback on r214111, we are going to use null to represent unspecified parameter. If the type array is {null}, it means a function that returns void; If the type array is {null, null}, it means a variadic function that returns void. In summary if we have more than one element in the type array and the last element is null, it is a variadic function. rdar://17628609 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214189 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -469,11 +469,13 @@ DIE *DwarfDebug::createScopeChildrenDIE(
|
||||
// If this is a variadic function, add an unspecified parameter.
|
||||
DISubprogram SP(Scope->getScopeNode());
|
||||
DITypeArray FnArgs = SP.getType().getTypeArray();
|
||||
if (resolve(FnArgs.getElement(FnArgs.getNumElements() - 1))
|
||||
.isUnspecifiedParameter()) {
|
||||
// If we have a single element of null, it is a function that returns void.
|
||||
// If we have more than one elements and the last one is null, it is a
|
||||
// variadic function.
|
||||
if (FnArgs.getNumElements() > 1 &&
|
||||
!resolve(FnArgs.getElement(FnArgs.getNumElements() - 1)))
|
||||
Children.push_back(
|
||||
make_unique<DIE>(dwarf::DW_TAG_unspecified_parameters));
|
||||
}
|
||||
}
|
||||
|
||||
// Collect lexical scope children first.
|
||||
|
Reference in New Issue
Block a user