10#include "TargetInfo.h"
33 return complexArgInfo();
40 return complexArgInfo();
73void MSP430TargetCodeGenInfo::setTargetAttributes(
75 if (GV->isDeclaration())
77 if (
const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(
D)) {
78 const auto *InterruptAttr = FD->getAttr<MSP430InterruptAttr>();
83 llvm::Function *F = cast<llvm::Function>(GV);
86 F->setCallingConv(llvm::CallingConv::MSP430_INTR);
89 F->addFnAttr(llvm::Attribute::NoInline);
90 F->addFnAttr(
"interrupt", llvm::utostr(InterruptAttr->getNumber()));
94std::unique_ptr<TargetCodeGenInfo>
96 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
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.
ABIArgInfo & getReturnInfo()
CanQualType getReturnType() const
MutableArrayRef< ArgInfo > arguments()
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
LValue MakeAddrLValue(Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
RValue EmitLoadOfAnyValue(LValue V, AggValueSlot Slot=AggValueSlot::ignored(), SourceLocation Loc={})
Like EmitLoadOfLValue but also handles complex and aggregate types.
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
RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty, AggValueSlot Slot) const override
EmitVAArg - Emit the target dependent code to load a value of.
ABIArgInfo classifyReturnType(QualType RetTy) const
void computeInfo(CGFunctionInfo &FI) const override
RValue - This trivial value class is used to represent the result of an expression that is evaluated.
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)
The JSON file list parser is used to communicate input to InstallAPI.