@@ -320,15 +320,14 @@ class SYCLIntegrationHeader {
320320 };
321321
322322public:
323- SYCLIntegrationHeader(DiagnosticsEngine &Diag, bool UnnamedLambdaSupport,
324- Sema &S);
323+ SYCLIntegrationHeader(bool UnnamedLambdaSupport, Sema &S);
325324
326325 /// Emits contents of the header into given stream.
327326 void emit(raw_ostream &Out);
328327
329328 /// Emits contents of the header into a file with given name.
330329 /// Returns true/false on success/failure.
331- bool emit(const StringRef & MainSrc);
330+ bool emit(StringRef MainSrc);
332331
333332 /// Signals that subsequent parameter descriptor additions will go to
334333 /// the kernel with given name. Starts new kernel invocation descriptor.
@@ -431,6 +430,16 @@ class SYCLIntegrationHeader {
431430 Sema &S;
432431};
433432
433+ class SYCLIntegrationFooter {
434+ public:
435+ SYCLIntegrationFooter(Sema &S) : S(S) {}
436+ bool emit(StringRef MainSrc);
437+
438+ private:
439+ bool emit(raw_ostream &O);
440+ Sema &S;
441+ };
442+
434443/// Tracks expected type during expression parsing, for use in code completion.
435444/// The type is tied to a particular token, all functions that update or consume
436445/// the type take a start location of the token they are looking at as a
@@ -10304,6 +10313,9 @@ class Sema final {
1030410313 SYCLIntelFPGAInitiationIntervalAttr *MergeSYCLIntelFPGAInitiationIntervalAttr(
1030510314 Decl *D, const SYCLIntelFPGAInitiationIntervalAttr &A);
1030610315
10316+ SYCLIntelFPGAMaxConcurrencyAttr *MergeSYCLIntelFPGAMaxConcurrencyAttr(
10317+ Decl *D, const SYCLIntelFPGAMaxConcurrencyAttr &A);
10318+
1030710319 /// AddAlignedAttr - Adds an aligned attribute to a particular declaration.
1030810320 void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
1030910321 bool IsPackExpansion);
@@ -10358,6 +10370,12 @@ class Sema final {
1035810370 /// declaration.
1035910371 void addSYCLIntelPipeIOAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ID);
1036010372
10373+ /// AddSYCLIntelFPGAMaxConcurrencyAttr - Adds a max_concurrency attribute to a
10374+ /// particular declaration.
10375+ void AddSYCLIntelFPGAMaxConcurrencyAttr(Decl *D,
10376+ const AttributeCommonInfo &CI,
10377+ Expr *E);
10378+
1036110379 bool checkNSReturnsRetainedReturnType(SourceLocation loc, QualType type);
1036210380 bool checkAllowedSYCLInitializer(VarDecl *VD,
1036310381 bool CheckValueDependent = false);
@@ -13110,6 +13128,7 @@ class Sema final {
1311013128 // SYCL integration header instance for current compilation unit this Sema
1311113129 // is associated with.
1311213130 std::unique_ptr<SYCLIntegrationHeader> SyclIntHeader;
13131+ std::unique_ptr<SYCLIntegrationFooter> SyclIntFooter;
1311313132
1311413133 // Used to suppress diagnostics during kernel construction, since these were
1311513134 // already emitted earlier. Diagnosing during Kernel emissions also skips the
@@ -13124,10 +13143,16 @@ class Sema final {
1312413143 SYCLIntegrationHeader &getSyclIntegrationHeader() {
1312513144 if (SyclIntHeader == nullptr)
1312613145 SyclIntHeader = std::make_unique<SYCLIntegrationHeader>(
13127- getDiagnostics(), getLangOpts().SYCLUnnamedLambda, *this);
13146+ getLangOpts().SYCLUnnamedLambda, *this);
1312813147 return *SyclIntHeader.get();
1312913148 }
1313013149
13150+ SYCLIntegrationFooter &getSyclIntegrationFooter() {
13151+ if (SyclIntFooter == nullptr)
13152+ SyclIntFooter = std::make_unique<SYCLIntegrationFooter>(*this);
13153+ return *SyclIntFooter.get();
13154+ }
13155+
1313113156 enum SYCLRestrictKind {
1313213157 KernelGlobalVariable,
1313313158 KernelRTTI,
0 commit comments