summaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-27 20:59:43 +0000
committerOwen Anderson <resistor@mac.com>2009-07-27 20:59:43 +0000
commit6f83c9c6ef0e7f79825a0a8f22941815e4b684c7 (patch)
treea6b206cab778933e7ebb35788fc3b41e47b57c7c /lib/VMCore/LLVMContextImpl.cpp
parent9a31254d0e51cfe08bc0e0c63ea04780cbc776f4 (diff)
downloadllvm-6f83c9c6ef0e7f79825a0a8f22941815e4b684c7.tar.gz
llvm-6f83c9c6ef0e7f79825a0a8f22941815e4b684c7.tar.bz2
llvm-6f83c9c6ef0e7f79825a0a8f22941815e4b684c7.tar.xz
Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.cpp')
-rw-r--r--lib/VMCore/LLVMContextImpl.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/VMCore/LLVMContextImpl.cpp b/lib/VMCore/LLVMContextImpl.cpp
index edd76fc031..5315e23f8e 100644
--- a/lib/VMCore/LLVMContextImpl.cpp
+++ b/lib/VMCore/LLVMContextImpl.cpp
@@ -49,41 +49,6 @@ static std::vector<Constant*> getValType(ConstantVector *CP) {
LLVMContextImpl::LLVMContextImpl(LLVMContext &C) :
Context(C), TheTrueVal(0), TheFalseVal(0) { }
-
-ConstantFP *LLVMContextImpl::getConstantFP(const APFloat &V) {
- DenseMapAPFloatKeyInfo::KeyTy Key(V);
-
- ConstantsLock.reader_acquire();
- ConstantFP *&Slot = FPConstants[Key];
- ConstantsLock.reader_release();
-
- if (!Slot) {
- sys::SmartScopedWriter<true> Writer(ConstantsLock);
- ConstantFP *&NewSlot = FPConstants[Key];
- if (!NewSlot) {
- const Type *Ty;
- if (&V.getSemantics() == &APFloat::IEEEsingle)
- Ty = Type::FloatTy;
- else if (&V.getSemantics() == &APFloat::IEEEdouble)
- Ty = Type::DoubleTy;
- else if (&V.getSemantics() == &APFloat::x87DoubleExtended)
- Ty = Type::X86_FP80Ty;
- else if (&V.getSemantics() == &APFloat::IEEEquad)
- Ty = Type::FP128Ty;
- else {
- assert(&V.getSemantics() == &APFloat::PPCDoubleDouble &&
- "Unknown FP format");
- Ty = Type::PPC_FP128Ty;
- }
- NewSlot = new ConstantFP(Ty, V);
- }
-
- return NewSlot;
- }
-
- return Slot;
-}
-
MDString *LLVMContextImpl::getMDString(const char *StrBegin,
unsigned StrLength) {
sys::SmartScopedWriter<true> Writer(ConstantsLock);