Rewrite calls to bitcast unprototyped functions when emitting a definition.
authorJohn McCall <rjmccall@apple.com>
Wed, 12 Dec 2012 22:21:47 +0000 (22:21 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 12 Dec 2012 22:21:47 +0000 (22:21 +0000)
commit49954ca014a0511a970092efab3a79f3dd7e39f5
treebe227f28e0df34f645e65821e7226e44c2d4ae54
parentb088ff661763a1486392c89cdb5a884d22cad28d
Rewrite calls to bitcast unprototyped functions when emitting a definition.

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
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/exceptions.c
clang/test/CodeGen/functions.c