Commit Graph

17 Commits

Author SHA1 Message Date
Stephen Lin 4362261b00 CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
llvm-svn: 188447
2013-08-15 06:47:53 +00:00
Bill Wendling 48939ced20 Update testcases due to Attribute sorting improvements.
llvm-svn: 175253
2013-02-15 05:25:49 +00:00
Bill Wendling 85ab57ac5d Update the tests.
This update coincides with r174110. That change ordered the attributes
alphabetically.

llvm-svn: 174111
2013-01-31 23:17:12 +00:00
Rafael Espindola fad28de40c Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.

llvm-svn: 166538
2012-10-24 01:59:00 +00:00
Rafael Espindola 077dd59371 Add inreg markers with the x86_fastcallcc calling convention.
llvm-svn: 166537
2012-10-24 01:58:58 +00:00
Aaron Ballman e91c6be01e Allowing individual targets to determine whether a given calling convention is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs.
Fixes PR13782

llvm-svn: 165015
2012-10-02 14:26:08 +00:00
John McCall cbc038a6c3 ANSI C requires that a call to an unprototyped function type succeed
if the definition has a non-variadic prototype with compatible
parameters.  Therefore, the default rule for such calls must be to
use a non-variadic convention.  Achieve this by casting the callee to
the function type with which it is required to be compatible, unless
the target specifically opts out and insists that unprototyped calls
should use the variadic rules.  The only case of that I'm aware of is
the x86-64 convention, which passes arguments the same way in both
cases but also sets a small amount of extra information;  here we seek
to maintain compatibility with GCC, which does set this when calling
an unprototyped function.

Addresses PR10810 and PR10713.

llvm-svn: 140241
2011-09-21 08:08:30 +00:00
Douglas Gregor a941dcae16 Add support for Microsoft's __thiscall, from Steven Watanabe!
llvm-svn: 104026
2010-05-18 16:57:00 +00:00
Eli Friedman b41ad0fbea PR7117: Make sure we don't lose the calling convention for K&R-style
definitions.
 

llvm-svn: 103932
2010-05-17 02:50:18 +00:00
John McCall ab26cfa58d 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().

llvm-svn: 95436
2010-02-05 21:31:56 +00:00
Charles Davis 2b2864c436 Convert this test to FileCheck instead of grepping LLVM IR.
llvm-svn: 95428
2010-02-05 20:45:48 +00:00
Charles Davis 5a5473f0f8 Now that we store calling conventions in the types, use them instead of
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.

llvm-svn: 95399
2010-02-05 18:13:10 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar 8b57697954 Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Daniel Dunbar 97ea867690 MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)

llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Anton Korobeynikov fdf389b9e4 Codegen support for fastcall & stdcall CC.
Patch by Ilya Okonsky!

llvm-svn: 59080
2008-11-11 20:21:14 +00:00