1 | #include "TargetInfo.h" |
---|---|
2 | #include "ABIInfo.h" |
3 | |
4 | using namespace clang; |
5 | using namespace clang::CIRGen; |
6 | namespace { |
7 | |
8 | class X8664ABIInfo : public ABIInfo { |
9 | public: |
10 | X8664ABIInfo(CIRGenTypes &cgt) : ABIInfo(cgt) {} |
11 | }; |
12 | |
13 | class X8664TargetCIRGenInfo : public TargetCIRGenInfo { |
14 | public: |
15 | X8664TargetCIRGenInfo(CIRGenTypes &cgt) |
16 | : TargetCIRGenInfo(std::make_unique<X8664ABIInfo>(args&: cgt)) {} |
17 | }; |
18 | |
19 | } // namespace |
20 | |
21 | std::unique_ptr<TargetCIRGenInfo> |
22 | clang::CIRGen::createX8664TargetCIRGenInfo(CIRGenTypes &cgt) { |
23 | return std::make_unique<X8664TargetCIRGenInfo>(args&: cgt); |
24 | } |
25 | |
26 | ABIInfo::~ABIInfo() noexcept = default; |
27 | |
28 | bool 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 |