[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp
Reid Spencer
reid at x10sys.com
Mon Jan 8 11:41:16 PST 2007
Changes in directory llvm/lib/VMCore:
Type.cpp updated: 1.155 -> 1.156
---
Log message:
Parameter attributes are part of a FunctionType and deserve to be factored
into comparisons of two FunctionTypes. Make it so.
---
Diffs of the changes: (+6 -1)
Type.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.155 llvm/lib/VMCore/Type.cpp:1.156
--- llvm/lib/VMCore/Type.cpp:1.155 Fri Jan 5 11:06:19 2007
+++ llvm/lib/VMCore/Type.cpp Mon Jan 8 13:41:01 2007
@@ -607,11 +607,16 @@
const FunctionType *FTy2 = cast<FunctionType>(Ty2);
if (FTy->isVarArg() != FTy2->isVarArg() ||
FTy->getNumParams() != FTy2->getNumParams() ||
+ FTy->getNumAttrs() != FTy2->getNumAttrs() ||
+ FTy->getParamAttrs(0) != FTy2->getParamAttrs(0) ||
!TypesEqual(FTy->getReturnType(), FTy2->getReturnType(), EqTypes))
return false;
- for (unsigned i = 0, e = FTy2->getNumParams(); i != e; ++i)
+ for (unsigned i = 0, e = FTy2->getNumParams(); i != e; ++i) {
+ if (FTy->getParamAttrs(i+1) != FTy->getParamAttrs(i+1))
+ return false;
if (!TypesEqual(FTy->getParamType(i), FTy2->getParamType(i), EqTypes))
return false;
+ }
return true;
} else {
assert(0 && "Unknown derived type!");
More information about the llvm-commits
mailing list