diff options
| author | Pekka Enberg <penberg@kernel.org> | 2011-08-30 20:26:57 +0300 |
|---|---|---|
| committer | Pekka Enberg <penberg@kernel.org> | 2011-08-30 20:28:46 +0300 |
| commit | 014de231b87ad9ba3f62b21abd4a591de742a5f4 (patch) | |
| tree | f8c9664addc2e43e5ef7560bc2527615091f8151 /validation/backend | |
| parent | be40b1a0e49a97f084c67d2ffc866b1445445d44 (diff) | |
| download | sparse-dev-014de231b87ad9ba3f62b21abd4a591de742a5f4.tar.gz | |
Revert "sparse, llvm: Don't redefine module local functions"
This reverts commit be40b1a0e49a97f084c67d2ffc866b1445445d44.
Jeff Garzik explains:
That last commit isn't quite right. The code before wasn't quite right either,
but the new commit doesn't do a whole lot:
commit be40b1a0e49a97f084c67d2ffc866b1445445d44
Author: Pekka Enberg <penberg@kernel.org>
Date: Tue Aug 30 18:10:25 2011 +0300
sparse, llvm: Don't redefine module local functions
Signed-off-by: Pekka Enberg <penberg@kernel.org>
First problem: we already have a list of function calling conventions cached
for use. That is what llfunc_list is.
However... this is _very wrong_ for varargs functions. Your commit changes to
using an LLVM list from a local list, but that does not fix the problem.
This test case should demonstrate the broken code:
int foo(int x, int y)
{
printf("%d\n", x);
printf("%d, %d\n", x, y);
return 0;
}
The first printf() cached [incorrectly] the list of arguments. c.f. this code
comment:
/* to avoid strangeness with varargs [for now], we build
* the function and type anew, for each call. This
* is probably wrong. We should look up the
* symbol declaration info.
*/
Diffstat (limited to 'validation/backend')
0 files changed, 0 insertions, 0 deletions
