diff options
author | John McCall <rjmccall@apple.com> | 2010-02-05 21:31:56 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-02-05 21:31:56 +0000 |
commit | 04a67a6aa3dfdc92d57f7f8d93ba397348c868a4 (patch) | |
tree | 2d199d8d6541ce97e1858876523c9ca2bd5a260e /test/CodeGen/attributes.c | |
parent | e50187a987dadb6a3b6f673125617c8f42ff3560 (diff) |
Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/attributes.c')
-rw-r--r-- | test/CodeGen/attributes.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c index 68bc73daec..770ce766df 100644 --- a/test/CodeGen/attributes.c +++ b/test/CodeGen/attributes.c @@ -74,3 +74,10 @@ int t19(void) { void t20(void) { __builtin_abort(); } + +void (__attribute__((fastcall)) *fptr)(int); +void t21(void) { + fptr(10); +} +// CHECK: [[FPTRVAR:%[a-z0-9]+]] = load void (i32)** @fptr +// CHECK-NEXT: call x86_fastcallcc void [[FPTRVAR]](i32 10) |