Skip to content

Commit 2d7044c

Browse files
committed
Clang importer: move name translation for throwing methods into importFullName.
The translation from the Objective-C NSError** convention into Swift throwing methods alters the names of methods. Move that computation into importFullName. This should be NFC refactoring for everything except the Swift name lookup tables, which will now correctly reflect this name translation.
1 parent 4c50598 commit 2d7044c

File tree

7 files changed

+610
-462
lines changed

7 files changed

+610
-462
lines changed

include/swift/AST/Identifier.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -438,34 +438,6 @@ class ObjCSelector {
438438
/// \param scratch Scratch space to use.
439439
StringRef getString(llvm::SmallVectorImpl<char> &scratch) const;
440440

441-
/// Ask whether this selector is a nullary selector (taking no
442-
/// arguments) whose name matches the given piece.
443-
bool isNullarySelector(StringRef piece) const {
444-
if (Storage.isSimpleName()) {
445-
return Storage.getBaseName().str() == piece;
446-
} else {
447-
return false;
448-
}
449-
}
450-
451-
/// Ask whether this selector is a non-nullary selector matching the
452-
/// given literal pieces.
453-
bool isNonNullarySelector(ArrayRef<StringRef> pieces) const {
454-
if (Storage.isSimpleName()) {
455-
return false;
456-
}
457-
458-
ArrayRef<Identifier> args = Storage.getArgumentNames();
459-
if (args.size() != pieces.size())
460-
return false;
461-
462-
for (size_t i = 0, e = args.size(); i != e; ++i) {
463-
if (args[i].str() != pieces[i])
464-
return false;
465-
}
466-
return true;
467-
}
468-
469441
void *getOpaqueValue() const { return Storage.getOpaqueValue(); }
470442
static ObjCSelector getFromOpaqueValue(void *p) {
471443
return ObjCSelector(DeclName::getFromOpaqueValue(p));

0 commit comments

Comments
 (0)