[llvm-commits] CVS: llvm/lib/Transforms/Utils/Linker.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Aug 28 11:44:02 PDT 2003
Changes in directory llvm/lib/Transforms/Utils:
Linker.cpp updated: 1.53 -> 1.54
---
Log message:
Fix bug where we considered function types equivalent even if they had differing numbers of arguments
---
Diffs of the changes:
Index: llvm/lib/Transforms/Utils/Linker.cpp
diff -u llvm/lib/Transforms/Utils/Linker.cpp:1.53 llvm/lib/Transforms/Utils/Linker.cpp:1.54
--- llvm/lib/Transforms/Utils/Linker.cpp:1.53 Sun Aug 24 14:30:20 2003
+++ llvm/lib/Transforms/Utils/Linker.cpp Thu Aug 28 11:42:50 2003
@@ -79,7 +79,9 @@
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),
More information about the llvm-commits
mailing list