Revert "[SILGen] Fix the type of closure thunks that are passed const referen…"

This reverts commit e074426058.
This commit is contained in:
Slava Pestov
2024-09-29 22:32:04 -04:00
committed by GitHub
parent bf6bb650ea
commit 9632979879
9 changed files with 27 additions and 164 deletions

View File

@@ -32,10 +32,6 @@ namespace llvm {
class raw_ostream;
}
namespace clang {
class Type;
}
namespace swift {
enum class EffectsKind : uint8_t;
class AbstractFunctionDecl;
@@ -208,9 +204,6 @@ struct SILDeclRef {
const GenericSignatureImpl *, CustomAttr *>
pointer;
// Type of closure thunk.
const clang::Type *thunkType = nullptr;
/// Returns the type of AST node location being stored by the SILDeclRef.
LocKind getLocKind() const {
if (loc.is<ValueDecl *>())
@@ -264,10 +257,11 @@ struct SILDeclRef {
/// for the containing ClassDecl.
/// - If 'loc' is a global VarDecl, this returns its GlobalAccessor
/// SILDeclRef.
explicit SILDeclRef(Loc loc, bool isForeign = false,
bool isDistributed = false,
bool isDistributedLocal = false,
const clang::Type *thunkType = nullptr);
explicit SILDeclRef(
Loc loc,
bool isForeign = false,
bool isDistributed = false,
bool isDistributedLocal = false);
/// See above put produces a prespecialization according to the signature.
explicit SILDeclRef(Loc loc, GenericSignature prespecializationSig);