mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-03 15:26:18 +00:00
[Debug Info] add DISubroutineType and its creation takes DITypeArray.
DITypeArray is an array of DITypeRef, at its creation, we will create DITypeRef (i.e use the identifier if the type node has an identifier). This is the last patch to unique the type array of a subroutine type. rdar://17628609 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -159,6 +159,10 @@ bool DIDescriptor::isTrivialType() const {
|
||||
return DbgNode && getTag() == dwarf::DW_TAG_unspecified_parameters;
|
||||
}
|
||||
|
||||
bool DIDescriptor::isSubroutineType() const {
|
||||
return isCompositeType() && getTag() == dwarf::DW_TAG_subroutine_type;
|
||||
}
|
||||
|
||||
/// isBasicType - Return true if the specified tag is legal for
|
||||
/// DIBasicType.
|
||||
bool DIDescriptor::isBasicType() const {
|
||||
@@ -1055,6 +1059,12 @@ void DebugInfoFinder::processType(DIType DT) {
|
||||
if (DT.isCompositeType()) {
|
||||
DICompositeType DCT(DT);
|
||||
processType(DCT.getTypeDerivedFrom().resolve(TypeIdentifierMap));
|
||||
if (DT.isSubroutineType()) {
|
||||
DITypeArray DTA = DISubroutineType(DT).getTypeArray();
|
||||
for (unsigned i = 0, e = DTA.getNumElements(); i != e; ++i)
|
||||
processType(DTA.getElement(i).resolve(TypeIdentifierMap));
|
||||
return;
|
||||
}
|
||||
DIArray DA = DCT.getElements();
|
||||
for (unsigned i = 0, e = DA.getNumElements(); i != e; ++i) {
|
||||
DIDescriptor D = DA.getElement(i);
|
||||
|
Reference in New Issue
Block a user