forked from OSchip/llvm-project
Make sure we allow "#pragma options align=mac68k" in function-local contexts. <rdar://problem/12453134>
llvm-svn: 165462
This commit is contained in:
parent
7cf8f3c9c2
commit
ae8ee25d8d
|
@ -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();
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue