diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-13 23:16:26 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-13 23:16:26 +0000 |
commit | 099c28e44622004fe278af697257eff8e58e8ada (patch) | |
tree | b05ea1cfb920c9acc7017963dde0a396b37168bb /lib/VMCore/Constants.cpp | |
parent | 5f1f0b8f7e7087d456ddc3efdb4bed21a4ae359c (diff) |
Move a bit more functionality to LLVMContext, which apparently wasn't being used anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r-- | lib/VMCore/Constants.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 184ae9d21e..8b71956e20 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -382,24 +382,6 @@ ConstantFP *ConstantFP::get(const APFloat &V) { return Slot; } -/// get() - This returns a constant fp for the specified value in the -/// specified type. This should only be used for simple constant values like -/// 2.0/1.0 etc, that are known-valid both as double and as the target format. -Constant *ConstantFP::get(const Type *Ty, double V) { - APFloat FV(V); - bool ignored; - FV.convert(*TypeToFloatSemantics(Ty->getScalarType()), - APFloat::rmNearestTiesToEven, &ignored); - Constant *C = get(FV); - - // For vectors, broadcast the value. - if (const VectorType *VTy = dyn_cast<VectorType>(Ty)) - return - ConstantVector::get(std::vector<Constant *>(VTy->getNumElements(), C)); - - return C; -} - //===----------------------------------------------------------------------===// // ConstantXXX Classes //===----------------------------------------------------------------------===// |