10#include "TargetInfo.h"
23 M68kTargetCodeGenInfo(CodeGenTypes &CGT)
24 : TargetCodeGenInfo(std::make_unique<DefaultABIInfo>(CGT)) {}
25 void setTargetAttributes(
const Decl *D, llvm::GlobalValue *GV,
26 CodeGen::CodeGenModule &M)
const override;
31void M68kTargetCodeGenInfo::setTargetAttributes(
33 if (
const auto *FD = dyn_cast_or_null<FunctionDecl>(D)) {
34 if (
const auto *attr = FD->getAttr<M68kInterruptAttr>()) {
39 F->setCallingConv(llvm::CallingConv::M68k_INTR);
42 F->addFnAttr(llvm::Attribute::NoInline);
45 unsigned Num =
attr->getNumber() / 2;
46 llvm::GlobalAlias::create(llvm::Function::ExternalLinkage,
47 "__isr_" + Twine(
Num), F);
52std::unique_ptr<TargetCodeGenInfo>
54 return std::make_unique<M68kTargetCodeGenInfo>(CGM.
getTypes());
This class organizes the cross-function state that is used while generating LLVM code.
CodeGenTypes & getTypes()
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...
Decl - This represents one declaration (or definition), e.g.
std::unique_ptr< TargetCodeGenInfo > createM68kTargetCodeGenInfo(CodeGenModule &CGM)
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicAllOfMatcher< Attr > attr
The JSON file list parser is used to communicate input to InstallAPI.
U cast(CodeGen::Address addr)