File indexing completed on 2026-05-10 08:37:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef LLVM_CLANG_SEMA_SEMARISCV_H
0014 #define LLVM_CLANG_SEMA_SEMARISCV_H
0015
0016 #include "clang/AST/ASTFwd.h"
0017 #include "clang/AST/Type.h"
0018 #include "clang/Basic/SourceLocation.h"
0019 #include "clang/Sema/SemaBase.h"
0020 #include "llvm/ADT/StringMap.h"
0021 #include "llvm/ADT/StringRef.h"
0022 #include <memory>
0023
0024 namespace clang {
0025 namespace sema {
0026 class RISCVIntrinsicManager;
0027 }
0028
0029 class ParsedAttr;
0030 class TargetInfo;
0031
0032 class SemaRISCV : public SemaBase {
0033 public:
0034 SemaRISCV(Sema &S);
0035
0036 bool CheckLMUL(CallExpr *TheCall, unsigned ArgNum);
0037 bool CheckBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
0038 CallExpr *TheCall);
0039 void checkRVVTypeSupport(QualType Ty, SourceLocation Loc, Decl *D,
0040 const llvm::StringMap<bool> &FeatureMap);
0041
0042 bool isValidRVVBitcast(QualType srcType, QualType destType);
0043
0044 void handleInterruptAttr(Decl *D, const ParsedAttr &AL);
0045 bool isAliasValid(unsigned BuiltinID, llvm::StringRef AliasName);
0046 bool isValidFMVExtension(StringRef Ext);
0047
0048
0049 bool DeclareRVVBuiltins = false;
0050
0051
0052 bool DeclareSiFiveVectorBuiltins = false;
0053
0054 std::unique_ptr<sema::RISCVIntrinsicManager> IntrinsicManager;
0055 };
0056
0057 std::unique_ptr<sema::RISCVIntrinsicManager>
0058 CreateRISCVIntrinsicManager(Sema &S);
0059 }
0060
0061 #endif