From 841e00b96295a2b66cb7573e961656d28a6cb12b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Aug 2003 16:42:50 +0000 Subject: 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 --- lib/VMCore/Linker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/VMCore/Linker.cpp') diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index 5280c04..81d46ca 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -79,7 +79,9 @@ static bool RecursiveResolveTypesI(const PATypeHolder &DestTy, switch (DestTyT->getPrimitiveID()) { case Type::FunctionTyID: { if (cast(DestTyT)->isVarArg() != - cast(SrcTyT)->isVarArg()) + cast(SrcTyT)->isVarArg() || + cast(DestTyT)->getNumContainedTypes() != + cast(SrcTyT)->getNumContainedTypes()) return true; for (unsigned i = 0, e = getFT(DestTy)->getNumContainedTypes(); i != e; ++i) if (RecursiveResolveTypesI(getFT(DestTy)->getContainedType(i), -- cgit v1.1