10 #include "TargetInfo.h"
12 using namespace clang;
33 return complexArgInfo();
40 return complexArgInfo();
64 void setTargetAttributes(
const Decl *D, llvm::GlobalValue *GV,
70 void MSP430TargetCodeGenInfo::setTargetAttributes(
72 if (GV->isDeclaration())
74 if (
const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D)) {
75 const auto *InterruptAttr = FD->getAttr<MSP430InterruptAttr>();
80 llvm::Function *F = cast<llvm::Function>(GV);
83 F->setCallingConv(llvm::CallingConv::MSP430_INTR);
86 F->addFnAttr(llvm::Attribute::NoInline);
87 F->addFnAttr(
"interrupt", llvm::utostr(InterruptAttr->getNumber()));
91 std::unique_ptr<TargetCodeGenInfo>
93 return std::make_unique<MSP430TargetCodeGenInfo>(CGM.
getTypes());
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
static ABIArgInfo getDirect(llvm::Type *T=nullptr, unsigned Offset=0, llvm::Type *Padding=nullptr, bool CanBeFlattened=true, unsigned Align=0)
void setCanBeFlattened(bool Flatten)
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...
CGFunctionInfo - Class to encapsulate the information about a function definition.
CanQualType getReturnType() const
MutableArrayRef< ArgInfo > arguments()
ABIArgInfo & getReturnInfo()
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
This class organizes the cross-function state that is used while generating LLVM code.
CodeGenTypes & getTypes()
This class organizes the cross-module state that is used while lowering AST types to LLVM types.
DefaultABIInfo - The default implementation for ABI specific details.
ABIArgInfo classifyArgumentType(QualType RetTy) const
ABIArgInfo classifyReturnType(QualType RetTy) const
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...
Decl - This represents one declaration (or definition), e.g.
Represents a function declaration or definition.
A (possibly-)qualified type.
bool isAnyComplexType() const
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
std::unique_ptr< TargetCodeGenInfo > createMSP430TargetCodeGenInfo(CodeGenModule &CGM)
bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
Address EmitVAArgInstr(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, const ABIArgInfo &AI)
The JSON file list parser is used to communicate input to InstallAPI.