1 //===--- LoongArch.cpp - Implement LoongArch target feature support -------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file implements LoongArch TargetInfo objects.
11 //===----------------------------------------------------------------------===//
13 #include "LoongArch.h"
14 #include "clang/Basic/Diagnostic.h"
15 #include "clang/Basic/MacroBuilder.h"
16 #include "clang/Basic/TargetBuiltins.h"
17 #include "llvm/ADT/StringSwitch.h"
18 #include "llvm/Support/TargetParser.h"
19 #include "llvm/Support/raw_ostream.h"
21 using namespace clang
;
22 using namespace clang::targets
;
24 ArrayRef
<const char *> LoongArchTargetInfo::getGCCRegNames() const {
25 // TODO: To be implemented in future.
29 ArrayRef
<TargetInfo::GCCRegAlias
>
30 LoongArchTargetInfo::getGCCRegAliases() const {
31 // TODO: To be implemented in future.
35 bool LoongArchTargetInfo::validateAsmConstraint(
36 const char *&Name
, TargetInfo::ConstraintInfo
&Info
) const {
37 // TODO: To be implemented in future.
41 void LoongArchTargetInfo::getTargetDefines(const LangOptions
&Opts
,
42 MacroBuilder
&Builder
) const {
43 Builder
.defineMacro("__loongarch__");
44 // TODO: Define more macros.
47 ArrayRef
<Builtin::Info
> LoongArchTargetInfo::getTargetBuiltins() const {
48 // TODO: To be implemented in future.