aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <djg@cray.com>2007-09-14 20:48:42 +0000
committerDan Gohman <djg@cray.com>2007-09-14 20:48:42 +0000
commit07f24bfa860a8016174c34628ef390f7aafdf502 (patch)
treed9929065c408e4b068957f71219661fc819bfe10
parent152cccbf6d9c7b3b0dac2095fa12de3086cd003c (diff)
downloadexternal_llvm-07f24bfa860a8016174c34628ef390f7aafdf502.zip
external_llvm-07f24bfa860a8016174c34628ef390f7aafdf502.tar.gz
external_llvm-07f24bfa860a8016174c34628ef390f7aafdf502.tar.bz2
And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41960 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/FoldingSet.h1
-rw-r--r--lib/Support/FoldingSet.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index d88a814..155243a 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -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);
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp
index 6f7f5ea..0ccb3a6 100644
--- a/lib/Support/FoldingSet.cpp
+++ b/lib/Support/FoldingSet.cpp
@@ -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));