mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-02 16:21:36 +00:00
Fix bug where we considered function types equivalent even if they had differing numbers of arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a55c4b1ce7
commit
841e00b962
@ -79,7 +79,9 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
|
||||
switch (DestTyT->getPrimitiveID()) {
|
||||
case Type::FunctionTyID: {
|
||||
if (cast<FunctionType>(DestTyT)->isVarArg() !=
|
||||
cast<FunctionType>(SrcTyT)->isVarArg())
|
||||
cast<FunctionType>(SrcTyT)->isVarArg() ||
|
||||
cast<FunctionType>(DestTyT)->getNumContainedTypes() !=
|
||||
cast<FunctionType>(SrcTyT)->getNumContainedTypes())
|
||||
return true;
|
||||
for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i)
|
||||
if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i),
|
||||
|
@ -79,7 +79,9 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
|
||||
switch (DestTyT->getPrimitiveID()) {
|
||||
case Type::FunctionTyID: {
|
||||
if (cast<FunctionType>(DestTyT)->isVarArg() !=
|
||||
cast<FunctionType>(SrcTyT)->isVarArg())
|
||||
cast<FunctionType>(SrcTyT)->isVarArg() ||
|
||||
cast<FunctionType>(DestTyT)->getNumContainedTypes() !=
|
||||
cast<FunctionType>(SrcTyT)->getNumContainedTypes())
|
||||
return true;
|
||||
for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i)
|
||||
if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i),
|
||||
|
@ -79,7 +79,9 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy,
|
||||
switch (DestTyT->getPrimitiveID()) {
|
||||
case Type::FunctionTyID: {
|
||||
if (cast<FunctionType>(DestTyT)->isVarArg() !=
|
||||
cast<FunctionType>(SrcTyT)->isVarArg())
|
||||
cast<FunctionType>(SrcTyT)->isVarArg() ||
|
||||
cast<FunctionType>(DestTyT)->getNumContainedTypes() !=
|
||||
cast<FunctionType>(SrcTyT)->getNumContainedTypes())
|
||||
return true;
|
||||
for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i)
|
||||
if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i),
|
||||
|
Loading…
x
Reference in New Issue
Block a user