summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/functions.c
Commit message (Collapse)AuthorAgeFilesLines
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-3/+3
| | | | | | tests fail. llvm-svn: 188447
* Rewrite calls to bitcast unprototyped functions when emitting a definition.John McCall2012-12-121-1/+1
| | | | | | | | | | | | My variadics patch, r169588, changed these calls to typically be bitcasts rather than calls to a supposedly variadic function. This totally subverted a hack where we intentionally dropped excess arguments from such calls in order to appease the inliner and a "warning" from the optimizer. This patch extends the hack to also work with bitcasts, as well as teaching it to rewrite invokes. llvm-svn: 170034
* ANSI C requires that a call to an unprototyped function type succeedJohn McCall2011-09-211-2/+2
| | | | | | | | | | | | | | | | | 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
* Merge this test into another.John McCall2011-06-271-0/+6
| | | | llvm-svn: 133957
* Properly pass the address of a lazily-generated function declaration withJohn McCall2010-04-281-0/+12
| | | | | | incomplete type. Fixes PR6911. llvm-svn: 102473
* Make this test portable to ABIs that use sret.John McCall2010-02-241-1/+1
| | | | llvm-svn: 97035
* Fix test case and convert fully to FileCheck.John McCall2010-02-241-6/+6
| | | | llvm-svn: 97032
* Canonicalize parameter and return types before computing ABI info. EliminatesJohn McCall2010-02-241-1/+10
| | | | | | | | | | | a common source of oddities and, in theory, removes some redundant ABI computations. Also fixes a miscompile I introduced yesterday by refactoring some code and causing a slightly different code path to be taken that didn't perform *parameter* type canonicalization, just normal type canonicalization; this in turn caused a bit of ABI code to misfire because it was looking for 'double' or 'float' but received 'const float'. llvm-svn: 97030
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-4/+4
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-2/+2
| | | | llvm-svn: 81346
* Prep for new warning.Mike Stump2009-07-211-0/+1
| | | | llvm-svn: 76638
* fix PR4423.Chris Lattner2009-06-231-0/+4
| | | | llvm-svn: 73938
* When defining a function whose type has no prototype, make an effortChris Lattner2009-05-051-1/+1
| | | | | | | | to go back and clean up existing uses of the bitcasted function. This is not just an optimization: it is required for correctness to get always inline functions to work, see testcases in function-attributes.c. llvm-svn: 70971
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* fix a fixme: non-proto struct returning function definitions should be compiledChris Lattner2009-03-221-1/+5
| | | | | | | | | to something like: define void @bar(%struct.foo* noalias sret %agg.result) nounwind { instead of: define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind { llvm-svn: 67475
* Don't emit K&R unprototyped function definitions as varargs.Daniel Dunbar2009-02-191-1/+13
| | | | | | - <rdar://problem/6584606> clang/x86-64 - too many reg saves llvm-svn: 65032
* When merging from a function with a prototype to a function without aDouglas Gregor2009-02-161-0/+2
| | | | | | prototype, synthesize ParmVarDecls for prototype-less FunctionDecl. llvm-svn: 64666
* Fix a regression I introduced in r54107:Chris Lattner2008-07-311-1/+7
| | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=54107 llvm-svn: 54242
* implement codegen for functions whose function body type don't matchChris Lattner2007-12-021-0/+11
their prototype. llvm-svn: 44506
OpenPOWER on IntegriCloud