diff options
author | Duncan Sands <baldrick@free.fr> | 2007-07-27 15:09:54 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-07-27 15:09:54 +0000 |
commit | 07c906623861576abc9b94a2285124a236272a32 (patch) | |
tree | e15d41cfd464e030cccacf99e7a06dca83a25634 /llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | 644f9173582f44b6293c7fadda5dc7e2bd5d5dfc (diff) | |
download | llvm-07c906623861576abc9b94a2285124a236272a32.zip llvm-07c906623861576abc9b94a2285124a236272a32.tar.gz llvm-07c906623861576abc9b94a2285124a236272a32.tar.bz2 |
As the number of parameter attributes increases,
Verifier::visitFunction is suffering a combinatorial
explosion due to the number of mutually incompatible
attributes. This patch tidies the whole thing up
using attribute masks. While there I fixed some
small bugs: (1) the ByVal attribute tests cast a
type to a pointer type, which can fail. Yes, the
fact it is of a pointer type is checked before,
but a failing check does not cause the program
to exit, it continues on outputting further errors;
(2) Nothing was checking that an sret attribute is
on the first parameter; (3) nothing was checking that
a function for which isStructReturn() is true has a
parameter with the sret attribute and vice-versa (I
don't think it is possible for this to go wrong, but
it seems right to check it).
llvm-svn: 40553
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
0 files changed, 0 insertions, 0 deletions