namespace llvm {
class APFloat;
+ class APInt;
/// This folding set used for two purposes:
/// 1. Given information about a node we want to create, look up the unique
void AddFloat(float F);
void AddDouble(double D);
void AddAPFloat(const APFloat& apf);
+ void AddAPInt(const APInt& api);
void AddString(const std::string &String);
/// clear - Clear the accumulated profile, allowing this FoldingSetNodeID
#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;
}
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++);