Make sure we allow "#pragma options align=mac68k" in function-local contexts. <rdar://problem/12453134>

llvm-svn: 165462
This commit is contained in:
Eli Friedman 2012-10-08 23:52:38 +00:00
parent 7cf8f3c9c2
commit ae8ee25d8d
2 changed files with 17 additions and 0 deletions

View File

@ -254,6 +254,11 @@ Retry:
HandlePragmaPack();
return StmtEmpty();
case tok::annot_pragma_align:
ProhibitAttributes(Attrs);
HandlePragmaAlign();
return StmtEmpty();
case tok::annot_pragma_fp_contract:
ProhibitAttributes(Attrs);
HandlePragmaFPContract();

View File

@ -96,3 +96,15 @@ extern int a11_0[offsetof(struct s11, f0) == 0 ? 1 : -1];
extern int a11_1[offsetof(struct s11, f1) == 2 ? 1 : -1];
extern int a11_2[sizeof(struct s11) == 10 ? 1 : -1];
extern int a11_3[__alignof(struct s11) == 2 ? 1 : -1];
#pragma options align=reset
void f12(void) {
#pragma options align=mac68k
struct s12 {
char f0;
int f1;
};
#pragma options align=reset
extern int a12[sizeof(struct s12) == 6 ? 1 : -1];
}