diff --git a/include/swift/ABI/Metadata.h b/include/swift/ABI/Metadata.h index 8049387c4e191..aa5ece97b10c2 100644 --- a/include/swift/ABI/Metadata.h +++ b/include/swift/ABI/Metadata.h @@ -2660,7 +2660,7 @@ struct TargetContextDescriptor { using ContextDescriptor = TargetContextDescriptor; -inline bool isCImportedModuleName(StringRef name) { +inline bool isCImportedModuleName(llvm::StringRef name) { // This does not include MANGLING_MODULE_CLANG_IMPORTER because that's // used only for synthesized declarations and not actual imported // declarations. @@ -2757,7 +2757,7 @@ class TargetGenericRequirementDescriptor { /// Retrieve the generic parameter that is the subject of this requirement, /// as a mangled type name. - StringRef getParam() const { + llvm::StringRef getParam() const { return swift::Demangle::makeSymbolicMangledNameStringRef(Param.get()); } @@ -2768,7 +2768,7 @@ class TargetGenericRequirementDescriptor { } /// Retrieve the right-hand type for a SameType or BaseClass requirement. - StringRef getMangledTypeName() const { + llvm::StringRef getMangledTypeName() const { assert(getKind() == GenericRequirementKind::SameType || getKind() == GenericRequirementKind::BaseClass); return swift::Demangle::makeSymbolicMangledNameStringRef(Type.get()); @@ -2999,7 +2999,7 @@ struct TargetExtensionContextDescriptor final using TrailingGenericContextObjects::getGenericContext; - StringRef getMangledExtendedContext() const { + llvm::StringRef getMangledExtendedContext() const { return Demangle::makeSymbolicMangledNameStringRef(ExtendedContext.get()); } @@ -3223,13 +3223,13 @@ struct TargetOpaqueTypeDescriptor final return (this ->template getTrailingObjects>())[i]; } - - StringRef getUnderlyingTypeArgument(unsigned i) const { + + llvm::StringRef getUnderlyingTypeArgument(unsigned i) const { assert(i < getNumUnderlyingTypeArguments()); const char *ptr = getUnderlyingTypeArgumentMangledName(i); return Demangle::makeSymbolicMangledNameStringRef(ptr); } - + static bool classof(const TargetContextDescriptor *cd) { return cd->getKind() == ContextDescriptorKind::OpaqueType; } diff --git a/include/swift/ABI/TypeIdentity.h b/include/swift/ABI/TypeIdentity.h index dadbd27abc73a..68a326f8c0c43 100644 --- a/include/swift/ABI/TypeIdentity.h +++ b/include/swift/ABI/TypeIdentity.h @@ -114,7 +114,7 @@ class TypeImportInfo { /// /// \return true if collection was successful. template - bool collect(StringRef value) { + bool collect(llvm::StringRef value) { #define check(CONDITION, COMMENT) \ do { \ if (!Asserting) { \ @@ -177,17 +177,17 @@ class TypeImportInfo { class ParsedTypeIdentity { public: /// The user-facing name of the type. - StringRef UserFacingName; + llvm::StringRef UserFacingName; /// The full identity of the type. /// Note that this may include interior '\0' characters. - StringRef FullIdentity; + llvm::StringRef FullIdentity; /// Any extended information that type might have. - llvm::Optional> ImportInfo; + llvm::Optional> ImportInfo; /// The ABI name of the type. - StringRef getABIName() const { + llvm::StringRef getABIName() const { if (ImportInfo && !ImportInfo->ABIName.empty()) return ImportInfo->ABIName; return UserFacingName; @@ -202,11 +202,11 @@ class ParsedTypeIdentity { return ImportInfo && !ImportInfo->RelatedEntityName.empty(); } - bool isRelatedEntity(StringRef entityName) const { + bool isRelatedEntity(llvm::StringRef entityName) const { return ImportInfo && ImportInfo->RelatedEntityName == entityName; } - StringRef getRelatedEntityName() const { + llvm::StringRef getRelatedEntityName() const { assert(isAnyRelatedEntity()); return ImportInfo->RelatedEntityName; }