ABI Checker: include mangled names in ABI descriptor files

Previously, we use USR as a delegate for mangled name. However, USR won't incorporate name changes made
by attributes like @_silgen_name. Instead, we should add a dedicated field for canonical mangled names.

rdar://84202064
This commit is contained in:
Xi Ge
2021-10-20 15:40:31 -07:00
parent bab9189bd7
commit a870b06055
9 changed files with 364 additions and 82 deletions

View File

@@ -339,6 +339,7 @@ struct PlatformIntroVersion {
class SDKNodeDecl: public SDKNode {
DeclKind DKind;
StringRef Usr;
StringRef MangledName;
SourceLoc Loc;
StringRef Location;
StringRef ModuleName;
@@ -463,6 +464,7 @@ public:
class SDKNodeTypeNominal : public SDKNodeType {
StringRef USR;
StringRef MangledName;
public:
SDKNodeTypeNominal(SDKNodeInitInfo Info);
// Get the usr of the corresponding nominal type decl.
@@ -583,6 +585,7 @@ public:
/// in the conformance, thus getName() will give us the name of the protocol.
class SDKNodeConformance: public SDKNode {
StringRef Usr;
StringRef MangledName;
SDKNodeDeclType *TypeDecl;
friend class SDKNodeDeclType;
bool IsABIPlaceholder;