1 //===----- SemaBPF.h ------- BPF target-specific routines -----*- 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 /// \file 9 /// This file declares semantic analysis functions specific to BPF. 10 /// 11 //===----------------------------------------------------------------------===// 12 13 #ifndef LLVM_CLANG_SEMA_SEMABPF_H 14 #define LLVM_CLANG_SEMA_SEMABPF_H 15 16 #include "clang/AST/Decl.h" 17 #include "clang/AST/DeclBase.h" 18 #include "clang/AST/Expr.h" 19 #include "clang/Sema/SemaBase.h" 20 21 namespace clang { 22 class ParsedAttr; 23 24 class SemaBPF : public SemaBase { 25 public: 26 SemaBPF(Sema &S); 27 28 bool CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall); 29 30 void handlePreserveAIRecord(RecordDecl *RD); 31 void handlePreserveAccessIndexAttr(Decl *D, const ParsedAttr &AL); 32 }; 33 } // namespace clang 34 35 #endif // LLVM_CLANG_SEMA_SEMABPF_H 36