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/Support/TargetParser.h"
18 #include "llvm/Support/raw_ostream.h"
20 using namespace clang
;
21 using namespace clang::targets
;
23 ArrayRef
<const char *> LoongArchTargetInfo::getGCCRegNames() const {
24 // TODO: To be implemented in future.
28 ArrayRef
<TargetInfo::GCCRegAlias
>
29 LoongArchTargetInfo::getGCCRegAliases() const {
30 // TODO: To be implemented in future.
34 bool LoongArchTargetInfo::validateAsmConstraint(
35 const char *&Name
, TargetInfo::ConstraintInfo
&Info
) const {
36 // TODO: To be implemented in future.
40 void LoongArchTargetInfo::getTargetDefines(const LangOptions
&Opts
,
41 MacroBuilder
&Builder
) const {
42 Builder
.defineMacro("__loongarch__");
43 // TODO: Define more macros.
46 ArrayRef
<Builtin::Info
> LoongArchTargetInfo::getTargetBuiltins() const {
47 // TODO: To be implemented in future.