Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions include/swift/ClangImporter/ClangImporterRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,18 +531,14 @@ enum class CxxEscapability { Escapable, NonEscapable, Unknown };
struct EscapabilityLookupDescriptor final {
const clang::Type *type;
ClangImporter::Implementation *impl;
// Only explicitly ~Escapable annotated types are considered ~Escapable.
// This is for backward compatibility, so we continue to import aggregates
// containing pointers as Escapable types.
bool annotationOnly = true;

friend llvm::hash_code hash_value(const EscapabilityLookupDescriptor &desc) {
return llvm::hash_combine(desc.type);
}

friend bool operator==(const EscapabilityLookupDescriptor &lhs,
const EscapabilityLookupDescriptor &rhs) {
return lhs.type == rhs.type && lhs.annotationOnly == rhs.annotationOnly;
return lhs.type == rhs.type;
}

friend bool operator!=(const EscapabilityLookupDescriptor &lhs,
Expand Down Expand Up @@ -575,15 +571,7 @@ SourceLoc extractNearestSourceLoc(EscapabilityLookupDescriptor desc);
// When a reference type is copied, the pointer’s value is copied rather than
// the object’s storage. This means reference types can be imported as
// copyable to Swift, even when they are non-copyable in C++.
enum class CxxValueSemanticsKind {
Unknown,
Copyable,
MoveOnly,
// A record that is either not copyable/movable or not destructible.
MissingLifetimeOperation,
// A record that has no copy and no move operations
UnavailableConstructors,
};
enum class CxxValueSemanticsKind { Unknown, Copyable, MoveOnly };

struct CxxValueSemanticsDescriptor final {
const clang::Type *type;
Expand Down
Loading