[NFC] Merge two category name accessors

This commit is contained in:
Becca Royal-Gordon
2024-04-26 17:54:39 -07:00
parent 0bbe26d7c2
commit c3225b066e
6 changed files with 28 additions and 36 deletions

View File

@@ -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;
}