summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Utils/Linker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/Linker.cpp b/llvm/lib/Transforms/Utils/Linker.cpp
index 5280c04565f..81d46ca3f44 100644
--- a/llvm/lib/Transforms/Utils/Linker.cpp
+++ b/llvm/lib/Transforms/Utils/Linker.cpp
@@ -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),
OpenPOWER on IntegriCloud