mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Merge two category name accessors
This commit is contained in:
@@ -1141,9 +1141,10 @@ namespace {
|
||||
std::optional<StringRef> getObjCImplCategoryName() const {
|
||||
if (!TheExtension || !TheExtension->isObjCImplementation())
|
||||
return std::nullopt;
|
||||
if (auto ident = TheExtension->getCategoryNameForObjCImplementation()) {
|
||||
assert(!ident->empty());
|
||||
return ident->str();
|
||||
assert(!TheExtension->hasClangNode());
|
||||
auto ident = TheExtension->getObjCCategoryName();
|
||||
if (!ident.empty()) {
|
||||
return ident.str();
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user