10#include "TargetInfo.h"
33 return complexArgInfo();
40 return complexArgInfo();
70void 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()));
91std::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)
CodeGen::CGCXXABI & getCXXABI() const
CGFunctionInfo - Class to encapsulate the information about a function definition.
ABIArgInfo & getReturnInfo()
CanQualType getReturnType() const
MutableArrayRef< ArgInfo > arguments()
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
void computeInfo(CGFunctionInfo &FI) const override
Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty) const override
EmitVAArg - Emit the target dependent code to load a value of.
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...
virtual void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const
setTargetAttributes - Provides a convenient hook to handle extra target-specific attributes for the g...
Decl - This represents one declaration (or definition), e.g.
Represents a function declaration or definition.
A (possibly-)qualified type.
bool isAnyComplexType() const
std::unique_ptr< TargetCodeGenInfo > createMSP430TargetCodeGenInfo(CodeGenModule &CGM)
Address EmitVAArgInstr(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, const ABIArgInfo &AI)