#include "RISCV.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/MacroBuilder.h"
#include "clang/Basic/TargetBuiltins.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/RISCVTargetParser.h"
#include <optional>
usingnamespaceclang;
usingnamespaceclang::targets;
ArrayRef<const char *> RISCVTargetInfo::getGCCRegNames() const { … }
ArrayRef<TargetInfo::GCCRegAlias> RISCVTargetInfo::getGCCRegAliases() const { … }
bool RISCVTargetInfo::validateAsmConstraint(
const char *&Name, TargetInfo::ConstraintInfo &Info) const { … }
std::string RISCVTargetInfo::convertConstraint(const char *&Constraint) const { … }
static unsigned getVersionValue(unsigned MajorVersion, unsigned MinorVersion) { … }
void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const { … }
static constexpr Builtin::Info BuiltinInfo[] = …;
ArrayRef<Builtin::Info> RISCVTargetInfo::getTargetBuiltins() const { … }
bool RISCVTargetInfo::initFeatureMap(
llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
const std::vector<std::string> &FeaturesVec) const { … }
std::optional<std::pair<unsigned, unsigned>>
RISCVTargetInfo::getVScaleRange(const LangOptions &LangOpts) const { … }
bool RISCVTargetInfo::hasFeature(StringRef Feature) const { … }
bool RISCVTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
DiagnosticsEngine &Diags) { … }
bool RISCVTargetInfo::isValidCPUName(StringRef Name) const { … }
void RISCVTargetInfo::fillValidCPUList(
SmallVectorImpl<StringRef> &Values) const { … }
bool RISCVTargetInfo::isValidTuneCPUName(StringRef Name) const { … }
void RISCVTargetInfo::fillValidTuneCPUList(
SmallVectorImpl<StringRef> &Values) const { … }
static void populateNegativeRISCVFeatures(std::vector<std::string> &Features) { … }
static void handleFullArchString(StringRef FullArchStr,
std::vector<std::string> &Features) { … }
ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const { … }
TargetInfo::CallingConvCheckResult
RISCVTargetInfo::checkCallingConvention(CallingConv CC) const { … }
bool RISCVTargetInfo::validateCpuSupports(StringRef Feature) const { … }
bool RISCVTargetInfo::isValidFeatureName(StringRef Name) const { … }
bool RISCVTargetInfo::validateGlobalRegisterVariable(
StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const { … }