clang 20.0.0 (based on r547379) from build 12806354. Bug: http://b/379133546 Test: N/A Change-Id: I2eb8938af55d809de674be63cb30cf27e801862b Upstream-Commit: ad834e67b1105d15ef907f6255d4c96e8e733f57
61 lines
1.9 KiB
C++
61 lines
1.9 KiB
C++
//===----- SemaRISCV.h ---- RISC-V target-specific routines ---*- C++ -*---===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
/// \file
|
|
/// This file declares semantic analysis functions specific to RISC-V.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_CLANG_SEMA_SEMARISCV_H
|
|
#define LLVM_CLANG_SEMA_SEMARISCV_H
|
|
|
|
#include "clang/AST/ASTFwd.h"
|
|
#include "clang/AST/Type.h"
|
|
#include "clang/Basic/SourceLocation.h"
|
|
#include "clang/Sema/SemaBase.h"
|
|
#include "llvm/ADT/StringMap.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include <memory>
|
|
|
|
namespace clang {
|
|
namespace sema {
|
|
class RISCVIntrinsicManager;
|
|
} // namespace sema
|
|
|
|
class ParsedAttr;
|
|
class TargetInfo;
|
|
|
|
class SemaRISCV : public SemaBase {
|
|
public:
|
|
SemaRISCV(Sema &S);
|
|
|
|
bool CheckLMUL(CallExpr *TheCall, unsigned ArgNum);
|
|
bool CheckBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
|
|
CallExpr *TheCall);
|
|
void checkRVVTypeSupport(QualType Ty, SourceLocation Loc, Decl *D,
|
|
const llvm::StringMap<bool> &FeatureMap);
|
|
|
|
bool isValidRVVBitcast(QualType srcType, QualType destType);
|
|
|
|
void handleInterruptAttr(Decl *D, const ParsedAttr &AL);
|
|
bool isAliasValid(unsigned BuiltinID, llvm::StringRef AliasName);
|
|
|
|
/// Indicate RISC-V vector builtin functions enabled or not.
|
|
bool DeclareRVVBuiltins = false;
|
|
|
|
/// Indicate RISC-V SiFive vector builtin functions enabled or not.
|
|
bool DeclareSiFiveVectorBuiltins = false;
|
|
|
|
std::unique_ptr<sema::RISCVIntrinsicManager> IntrinsicManager;
|
|
};
|
|
|
|
std::unique_ptr<sema::RISCVIntrinsicManager>
|
|
CreateRISCVIntrinsicManager(Sema &S);
|
|
} // namespace clang
|
|
|
|
#endif // LLVM_CLANG_SEMA_SEMARISCV_H
|