1//===---- SystemZ.cpp - SystemZ-specific CIR CodeGen ----------------------===//
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 provides SystemZ-specific CIR CodeGen logic.
10//
11//===----------------------------------------------------------------------===//
12
13#include "ABIInfo.h"
14#include "CIRGenModule.h"
15#include "TargetInfo.h"
16#include "clang/AST/Decl.h"
17#include "clang/CIR/MissingFeatures.h"
18
19using namespace clang;
20using namespace clang::CIRGen;
21
22namespace {
23
24class SystemZABIInfo : public ABIInfo {
25public:
26 SystemZABIInfo(CIRGenTypes &cgt) : ABIInfo(cgt) {}
27};
28
29class SystemZTargetCIRGenInfo : public TargetCIRGenInfo {
30public:
31 SystemZTargetCIRGenInfo(CIRGenTypes &cgt)
32 : TargetCIRGenInfo(std::make_unique<SystemZABIInfo>(args&: cgt)) {}
33
34 void setTargetAttributes(const Decl *d, mlir::Operation *gv,
35 CIRGenModule &cgm) const override {
36 if (!d)
37 return;
38 assert(!cir::MissingFeatures::s390xVisibleVectorABI());
39 }
40};
41
42} // namespace
43
44std::unique_ptr<TargetCIRGenInfo>
45clang::CIRGen::createSystemZTargetCIRGenInfo(CIRGenTypes &cgt) {
46 return std::make_unique<SystemZTargetCIRGenInfo>(args&: cgt);
47}
48