And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
authorDan Gohman <gohman@apple.com>
Fri, 14 Sep 2007 20:48:42 +0000 (20:48 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 14 Sep 2007 20:48:42 +0000 (20:48 +0000)
ambiguity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41960 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/FoldingSet.h
lib/Support/FoldingSet.cpp

index d88a814242c58ac13de62fc714f7b05e157b77ee..155243a6277c6d1ecaba4fe615e32074c43ef459 100644 (file)
@@ -149,6 +149,7 @@ public:
     void AddPointer(const void *Ptr);
     void AddInteger(signed I);
     void AddInteger(unsigned I);
+    void AddInteger(int64_t I);
     void AddInteger(uint64_t I);
     void AddFloat(float F);
     void AddDouble(double D);
index 6f7f5ea4cbf3cc09d910579ba03b1191f8d2e445..0ccb3a6cc3284d388331c052b3fcedc8a71dc3df 100644 (file)
@@ -40,6 +40,9 @@ void FoldingSetImpl::NodeID::AddInteger(signed I) {
 void FoldingSetImpl::NodeID::AddInteger(unsigned I) {
   Bits.push_back(I);
 }
+void FoldingSetImpl::NodeID::AddInteger(int64_t I) {
+  AddInteger((uint64_t)I);
+}
 void FoldingSetImpl::NodeID::AddInteger(uint64_t I) {
   Bits.push_back(unsigned(I));