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

Commit b7e44f4

Browse files
author
Dylan McKay
committed
[AVR] Process the externally_visible attribute
1 parent 287e62c commit b7e44f4

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

lib/Sema/SemaDeclAttr.cpp

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4222,13 +4222,6 @@ static void handleMSP430InterruptAttr(Sema &S, Decl *D,
42224222
D->addAttr(UsedAttr::CreateImplicit(S.Context));
42234223
}
42244224

4225-
static void handleAVRSignalAttr(Sema &S, Decl *D,
4226-
const AttributeList &Attr) {
4227-
4228-
D->addAttr(::new (S.Context)
4229-
AVRSignalAttr(Attr.getLoc(), S.Context, Attr.getAttributeSpellingListIndex()));
4230-
}
4231-
42324225
static void handleInterruptAttr(Sema &S, Decl *D, const AttributeList &Attr) {
42334226
// Dispatch the interrupt attribute based on the current target.
42344227
if (S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::msp430)
@@ -4237,6 +4230,20 @@ static void handleInterruptAttr(Sema &S, Decl *D, const AttributeList &Attr) {
42374230
handleARMInterruptAttr(S, D, Attr);
42384231
}
42394232

4233+
static void handleAVRSignalAttr(Sema &S, Decl *D,
4234+
const AttributeList &Attr) {
4235+
4236+
D->addAttr(::new (S.Context)
4237+
AVRSignalAttr(Attr.getLoc(), S.Context, Attr.getAttributeSpellingListIndex()));
4238+
}
4239+
4240+
static void handleExternallyVisibleAttr(Sema &S, Decl *D,
4241+
const AttributeList &Attr) {
4242+
4243+
D->addAttr(::new (S.Context)
4244+
AVRSignalAttr(Attr.getLoc(), S.Context, Attr.getAttributeSpellingListIndex()));
4245+
}
4246+
42404247
static void handleAMDGPUNumVGPRAttr(Sema &S, Decl *D,
42414248
const AttributeList &Attr) {
42424249
uint32_t NumRegs;
@@ -4601,7 +4608,10 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
46014608
handleInterruptAttr(S, D, Attr);
46024609
break;
46034610
case AttributeList::AT_AVRSignal:
4604-
handleAVRSignalAttr(S, D,Attr);
4611+
handleAVRSignalAttr(S, D, Attr);
4612+
break;
4613+
case AttributeList::AT_ExternallyVisible:
4614+
handleExternallyVisibleAttr(S, D, Attr);
46054615
break;
46064616
case AttributeList::AT_X86ForceAlignArgPointer:
46074617
handleX86ForceAlignArgPointerAttr(S, D, Attr);

0 commit comments

Comments
 (0)