diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-16 20:21:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-16 20:21:15 +0000 |
commit | 8b70b78ba489b090d9866e6a4084ab1e8613b527 (patch) | |
tree | c3e137b779b119b92587950176b457381132b18f /lib/VMCore/ConstantFold.h | |
parent | f3b2410bc4c098c0f27f689c797a539d6ef8a09e (diff) | |
download | external_llvm-8b70b78ba489b090d9866e6a4084ab1e8613b527.zip external_llvm-8b70b78ba489b090d9866e6a4084ab1e8613b527.tar.gz external_llvm-8b70b78ba489b090d9866e6a4084ab1e8613b527.tar.bz2 |
Fixes for PR114: Thanks to Reid Spencer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.h')
-rw-r--r-- | lib/VMCore/ConstantFold.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/ConstantFold.h b/lib/VMCore/ConstantFold.h index a0a01e5..b392ad1 100644 --- a/lib/VMCore/ConstantFold.h +++ b/lib/VMCore/ConstantFold.h @@ -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(); |