From 14cf78cde5e0e64bf55443e657c1250d55e2021c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 14 Sep 2007 20:48:42 +0000 Subject: [PATCH] And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid ambiguity. llvm-svn: 41960 --- llvm/include/llvm/ADT/FoldingSet.h | 1 + llvm/lib/Support/FoldingSet.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h index d88a814242c5..155243a6277c 100644 --- a/llvm/include/llvm/ADT/FoldingSet.h +++ b/llvm/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/llvm/lib/Support/FoldingSet.cpp b/llvm/lib/Support/FoldingSet.cpp index 6f7f5ea4cbf3..0ccb3a6cc328 100644 --- a/llvm/lib/Support/FoldingSet.cpp +++ b/llvm/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));