Skip to content
This repository has been archived by the owner on Sep 2, 2018. It is now read-only.

Commit

Permalink
[AVR] Process the externally_visible attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan McKay committed Jul 9, 2015
1 parent 287e62c commit b7e44f4
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4222,13 +4222,6 @@ static void handleMSP430InterruptAttr(Sema &S, Decl *D,
D->addAttr(UsedAttr::CreateImplicit(S.Context));
}

static void handleAVRSignalAttr(Sema &S, Decl *D,
const AttributeList &Attr) {

D->addAttr(::new (S.Context)
AVRSignalAttr(Attr.getLoc(), S.Context, Attr.getAttributeSpellingListIndex()));
}

static void handleInterruptAttr(Sema &S, Decl *D, const AttributeList &Attr) {
// Dispatch the interrupt attribute based on the current target.
if (S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::msp430)
Expand All @@ -4237,6 +4230,20 @@ static void handleInterruptAttr(Sema &S, Decl *D, const AttributeList &Attr) {
handleARMInterruptAttr(S, D, Attr);
}

static void handleAVRSignalAttr(Sema &S, Decl *D,
const AttributeList &Attr) {

D->addAttr(::new (S.Context)
AVRSignalAttr(Attr.getLoc(), S.Context, Attr.getAttributeSpellingListIndex()));
}

static void handleExternallyVisibleAttr(Sema &S, Decl *D,
const AttributeList &Attr) {

D->addAttr(::new (S.Context)
AVRSignalAttr(Attr.getLoc(), S.Context, Attr.getAttributeSpellingListIndex()));
}

static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D,
const AttributeList &Attr) {
uint32_t NumRegs;
Expand Down Expand Up @@ -4601,7 +4608,10 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
handleInterruptAttr(S, D, Attr);
break;
case AttributeList::AT_AVRSignal:
handleAVRSignalAttr(S, D,Attr);
handleAVRSignalAttr(S, D, Attr);
break;
case AttributeList::AT_ExternallyVisible:
handleExternallyVisibleAttr(S, D, Attr);
break;
case AttributeList::AT_X86ForceAlignArgPointer:
handleX86ForceAlignArgPointerAttr(S, D, Attr);
Expand Down

0 comments on commit b7e44f4

Please sign in to comment.