[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / lib / Basic / Targets / LoongArch.cpp
blob34d8bdbe1dbdc877f0b292acbf49a9e341211fe4
1 //===--- LoongArch.cpp - Implement LoongArch target feature support -------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
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.
26 return {};
29 ArrayRef<TargetInfo::GCCRegAlias>
30 LoongArchTargetInfo::getGCCRegAliases() const {
31 // TODO: To be implemented in future.
32 return {};
35 bool LoongArchTargetInfo::validateAsmConstraint(
36 const char *&Name, TargetInfo::ConstraintInfo &Info) const {
37 // TODO: To be implemented in future.
38 return false;
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.
49 return {};