[Type Checker] Factor out the Objective-C-specific checking for decls.

There is a lot of code involved in inferring and checking @objc that
was tangled with other checking for declarations and types. Move it
into its own source file with a more narrowly-defined interface. NFC
This commit is contained in:
Doug Gregor
2018-07-05 10:13:47 -07:00
parent 799ef43a3a
commit d39aae0e46
8 changed files with 1578 additions and 1494 deletions

View File

@@ -18,6 +18,7 @@
#ifndef SWIFT_TYPECHECKING_CODESYNTHESIS_H
#define SWIFT_TYPECHECKING_CODESYNTHESIS_H
#include "TypeCheckObjC.h"
#include "swift/AST/ForeignErrorConvention.h"
#include "swift/Basic/ExternalUnion.h"
#include "swift/Basic/LLVM.h"
@@ -95,9 +96,6 @@ public:
// These are implemented in TypeCheckDecl.cpp.
void makeFinal(ASTContext &ctx, ValueDecl *D);
void makeDynamic(ASTContext &ctx, ValueDecl *D);
void markAsObjC(TypeChecker &TC, ValueDecl *D,
Optional<ObjCReason> isObjC,
Optional<ForeignErrorConvention> errorConvention = None);
// Implemented in TypeCheckerOverride.cpp
bool checkOverrides(TypeChecker &TC, ValueDecl *decl);