1//===-- lib/Semantics/check-cuda.h ------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef FORTRAN_SEMANTICS_CHECK_CUDA_H_
10#define FORTRAN_SEMANTICS_CHECK_CUDA_H_
11
12#include "flang/Semantics/semantics.h"
13#include <list>
14
15namespace Fortran::parser {
16struct Program;
17class Messages;
18struct Name;
19class CharBlock;
20struct AssignmentStmt;
21struct ExecutionPartConstruct;
22struct ExecutableConstruct;
23struct ActionStmt;
24struct IfConstruct;
25struct CUFKernelDoConstruct;
26struct SubroutineSubprogram;
27struct FunctionSubprogram;
28struct SeparateModuleSubprogram;
29} // namespace Fortran::parser
30
31namespace Fortran::semantics {
32
33class SemanticsContext;
34
35class CUDAChecker : public virtual BaseChecker {
36public:
37 explicit CUDAChecker(SemanticsContext &c) : context_{c} {}
38 void Enter(const parser::SubroutineSubprogram &);
39 void Enter(const parser::FunctionSubprogram &);
40 void Enter(const parser::SeparateModuleSubprogram &);
41 void Enter(const parser::CUFKernelDoConstruct &);
42 void Enter(const parser::AssignmentStmt &);
43
44private:
45 SemanticsContext &context_;
46};
47
48bool CanonicalizeCUDA(parser::Program &);
49
50} // namespace Fortran::semantics
51
52#endif // FORTRAN_SEMANTICS_CHECK_CUDA_H_
53

source code of flang/lib/Semantics/check-cuda.h