1#include "TargetInfo.h"
2#include "ABIInfo.h"
3
4using namespace clang;
5using namespace clang::CIRGen;
6namespace {
7
8class X8664ABIInfo : public ABIInfo {
9public:
10 X8664ABIInfo(CIRGenTypes &cgt) : ABIInfo(cgt) {}
11};
12
13class X8664TargetCIRGenInfo : public TargetCIRGenInfo {
14public:
15 X8664TargetCIRGenInfo(CIRGenTypes &cgt)
16 : TargetCIRGenInfo(std::make_unique<X8664ABIInfo>(args&: cgt)) {}
17};
18
19} // namespace
20
21std::unique_ptr<TargetCIRGenInfo>
22clang::CIRGen::createX8664TargetCIRGenInfo(CIRGenTypes &cgt) {
23 return std::make_unique<X8664TargetCIRGenInfo>(args&: cgt);
24}
25
26ABIInfo::~ABIInfo() noexcept = default;
27
28bool TargetCIRGenInfo::isNoProtoCallVariadic(
29 const FunctionNoProtoType *fnType) const {
30 // The following conventions are known to require this to be false:
31 // x86_stdcall
32 // MIPS
33 // For everything else, we just prefer false unless we opt out.
34 return false;
35}
36

source code of clang/lib/CIR/CodeGen/TargetInfo.cpp