Skip to content

Commit 5e1eadc

Browse files
authored
Merge pull request #32169 from compnerd/qualified-llvm-support
ABI: qualify use of `StringRef` and `Optional` (NFC)
2 parents 7c8d860 + 41095aa commit 5e1eadc

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

include/swift/ABI/Metadata.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,7 @@ struct TargetContextDescriptor {
26602660

26612661
using ContextDescriptor = TargetContextDescriptor<InProcess>;
26622662

2663-
inline bool isCImportedModuleName(StringRef name) {
2663+
inline bool isCImportedModuleName(llvm::StringRef name) {
26642664
// This does not include MANGLING_MODULE_CLANG_IMPORTER because that's
26652665
// used only for synthesized declarations and not actual imported
26662666
// declarations.
@@ -2757,7 +2757,7 @@ class TargetGenericRequirementDescriptor {
27572757

27582758
/// Retrieve the generic parameter that is the subject of this requirement,
27592759
/// as a mangled type name.
2760-
StringRef getParam() const {
2760+
llvm::StringRef getParam() const {
27612761
return swift::Demangle::makeSymbolicMangledNameStringRef(Param.get());
27622762
}
27632763

@@ -2768,7 +2768,7 @@ class TargetGenericRequirementDescriptor {
27682768
}
27692769

27702770
/// Retrieve the right-hand type for a SameType or BaseClass requirement.
2771-
StringRef getMangledTypeName() const {
2771+
llvm::StringRef getMangledTypeName() const {
27722772
assert(getKind() == GenericRequirementKind::SameType ||
27732773
getKind() == GenericRequirementKind::BaseClass);
27742774
return swift::Demangle::makeSymbolicMangledNameStringRef(Type.get());
@@ -2999,7 +2999,7 @@ struct TargetExtensionContextDescriptor final
29992999

30003000
using TrailingGenericContextObjects::getGenericContext;
30013001

3002-
StringRef getMangledExtendedContext() const {
3002+
llvm::StringRef getMangledExtendedContext() const {
30033003
return Demangle::makeSymbolicMangledNameStringRef(ExtendedContext.get());
30043004
}
30053005

@@ -3223,13 +3223,13 @@ struct TargetOpaqueTypeDescriptor final
32233223
return (this
32243224
->template getTrailingObjects<RelativeDirectPointer<const char>>())[i];
32253225
}
3226-
3227-
StringRef getUnderlyingTypeArgument(unsigned i) const {
3226+
3227+
llvm::StringRef getUnderlyingTypeArgument(unsigned i) const {
32283228
assert(i < getNumUnderlyingTypeArguments());
32293229
const char *ptr = getUnderlyingTypeArgumentMangledName(i);
32303230
return Demangle::makeSymbolicMangledNameStringRef(ptr);
32313231
}
3232-
3232+
32333233
static bool classof(const TargetContextDescriptor<Runtime> *cd) {
32343234
return cd->getKind() == ContextDescriptorKind::OpaqueType;
32353235
}

include/swift/ABI/TypeIdentity.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class TypeImportInfo {
114114
///
115115
/// \return true if collection was successful.
116116
template <bool Asserting>
117-
bool collect(StringRef value) {
117+
bool collect(llvm::StringRef value) {
118118
#define check(CONDITION, COMMENT) \
119119
do { \
120120
if (!Asserting) { \
@@ -177,17 +177,17 @@ class TypeImportInfo {
177177
class ParsedTypeIdentity {
178178
public:
179179
/// The user-facing name of the type.
180-
StringRef UserFacingName;
180+
llvm::StringRef UserFacingName;
181181

182182
/// The full identity of the type.
183183
/// Note that this may include interior '\0' characters.
184-
StringRef FullIdentity;
184+
llvm::StringRef FullIdentity;
185185

186186
/// Any extended information that type might have.
187-
llvm::Optional<TypeImportInfo<StringRef>> ImportInfo;
187+
llvm::Optional<TypeImportInfo<llvm::StringRef>> ImportInfo;
188188

189189
/// The ABI name of the type.
190-
StringRef getABIName() const {
190+
llvm::StringRef getABIName() const {
191191
if (ImportInfo && !ImportInfo->ABIName.empty())
192192
return ImportInfo->ABIName;
193193
return UserFacingName;
@@ -202,11 +202,11 @@ class ParsedTypeIdentity {
202202
return ImportInfo && !ImportInfo->RelatedEntityName.empty();
203203
}
204204

205-
bool isRelatedEntity(StringRef entityName) const {
205+
bool isRelatedEntity(llvm::StringRef entityName) const {
206206
return ImportInfo && ImportInfo->RelatedEntityName == entityName;
207207
}
208208

209-
StringRef getRelatedEntityName() const {
209+
llvm::StringRef getRelatedEntityName() const {
210210
assert(isAnyRelatedEntity());
211211
return ImportInfo->RelatedEntityName;
212212
}

0 commit comments

Comments
 (0)