llvm.org GIT mirror llvm / 841e00b
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 Chris Lattner 17 years ago
3 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
7878 switch (DestTyT->getPrimitiveID()) {
7979 case Type::FunctionTyID: {
8080 if (cast(DestTyT)->isVarArg() !=
81 cast(SrcTyT)->isVarArg())
81 cast(SrcTyT)->isVarArg() ||
82 cast(DestTyT)->getNumContainedTypes() !=
83 cast(SrcTyT)->getNumContainedTypes())
8284 return true;
8385 for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i)
8486 if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i),
7878 switch (DestTyT->getPrimitiveID()) {
7979 case Type::FunctionTyID: {
8080 if (cast(DestTyT)->isVarArg() !=
81 cast(SrcTyT)->isVarArg())
81 cast(SrcTyT)->isVarArg() ||
82 cast(DestTyT)->getNumContainedTypes() !=
83 cast(SrcTyT)->getNumContainedTypes())
8284 return true;
8385 for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i)
8486 if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i),
7878 switch (DestTyT->getPrimitiveID()) {
7979 case Type::FunctionTyID: {
8080 if (cast(DestTyT)->isVarArg() !=
81 cast(SrcTyT)->isVarArg())
81 cast(SrcTyT)->isVarArg() ||
82 cast(DestTyT)->getNumContainedTypes() !=
83 cast(SrcTyT)->getNumContainedTypes())
8284 return true;
8385 for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i)
8486 if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i),