diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-11 17:24:50 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-11 17:24:50 +0000 |
commit | dc71c8051d354cad8673e651209e431584310d5b (patch) | |
tree | 892502fb68fc883c8ed89d9185f8cd586e8ef8a9 /lib/Support/FoldingSet.cpp | |
parent | 49e6df9ba4bd7c13b9c2e179c0f3905c5df8e149 (diff) | |
download | external_llvm-dc71c8051d354cad8673e651209e431584310d5b.zip external_llvm-dc71c8051d354cad8673e651209e431584310d5b.tar.gz external_llvm-dc71c8051d354cad8673e651209e431584310d5b.tar.bz2 |
Added "Profile" method to APFloat for use with FoldingSet.
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary
objects to a profile via dispatch to FoldingSetTrait<T>::Profile().
Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FoldingSet.cpp')
-rw-r--r-- | lib/Support/FoldingSet.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp index b2d3483..2d2279c 100644 --- a/lib/Support/FoldingSet.cpp +++ b/lib/Support/FoldingSet.cpp @@ -15,8 +15,6 @@ //===----------------------------------------------------------------------===// #include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/APFloat.h" -#include "llvm/ADT/APInt.h" #include "llvm/Support/MathExtras.h" #include <cassert> using namespace llvm; @@ -58,15 +56,6 @@ void FoldingSetNodeID::AddFloat(float F) { void FoldingSetNodeID::AddDouble(double D) { AddInteger(DoubleToBits(D)); } -void FoldingSetNodeID::AddAPFloat(const APFloat& apf) { - APInt api = apf.convertToAPInt(); - AddAPInt(api); -} -void FoldingSetNodeID::AddAPInt(const APInt& api) { - const uint64_t *p = api.getRawData(); - for (unsigned i=0; i<api.getNumWords(); i++) - AddInteger(*p++); -} void FoldingSetNodeID::AddString(const std::string &String) { unsigned Size = String.size(); Bits.push_back(Size); |