Fixes for PR114: Thanks to Reid Spencer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-11-16 20:21:15 +00:00
parent f3b2410bc4
commit 8b70b78ba4
28 changed files with 108 additions and 81 deletions

View File

@@ -113,7 +113,8 @@ public:
case Type::LongTyID: return castToLong(V);
case Type::FloatTyID: return castToFloat(V);
case Type::DoubleTyID: return castToDouble(V);
case Type::PointerTyID:return castToPointer(V, (PointerType*)Ty);
case Type::PointerTyID:
return castToPointer(V, reinterpret_cast<const PointerType*>(Ty));
default: return 0;
}
}
@@ -125,7 +126,7 @@ public:
static inline ConstRules *get(const Constant &V1, const Constant &V2) {
if (isa<ConstantExpr>(V1) || isa<ConstantExpr>(V2))
return getConstantExprRules();
return (ConstRules*)V1.getType()->getOrCreateAnnotation(AID);
return static_cast<ConstRules*>(V1.getType()->getOrCreateAnnotation(AID));
}
private:
static ConstRules *getConstantExprRules();