From d97321ceb313f06fd9a824cf26b9dc5b80b3eb9d Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 18 Dec 2006 08:18:46 +0000 Subject: [PATCH] Remove the two-argument (inferred cast) form of ConstantExpr::getCast now that its last uses have been removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32653 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Constants.h | 2 -- lib/VMCore/Constants.cpp | 7 ------- 2 files changed, 9 deletions(-) diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 1940e5b831e..36d8299f48f 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -572,8 +572,6 @@ public: const Type *Ty ///< The integer type to cast to ); - static Constant *getCast(Constant *C, const Type *Ty); - /// @brief Return true if this is a convert constant expression bool isCast() const; diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 3339a182140..c2709182878 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -1480,13 +1480,6 @@ Constant *ConstantExpr::getCast(unsigned oc, Constant *C, const Type *Ty) { return 0; } -Constant *ConstantExpr::getCast(Constant *C, const Type *Ty) { - // Note: we can't inline this because it requires the Instructions.h header - return getCast(CastInst::getCastOpcode( - C, C->getType()->isSigned(), Ty, Ty->isSigned()), C, Ty); -} - - Constant *ConstantExpr::getZExtOrBitCast(Constant *C, const Type *Ty) { if (C->getType()->getPrimitiveSizeInBits() == Ty->getPrimitiveSizeInBits()) return getCast(Instruction::BitCast, C, Ty); -- 2.34.1