summaryrefslogtreecommitdiff
path: root/lib/Support/APSInt.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-19 04:31:12 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-19 04:31:12 +0000
commit4048a082847cea72431aa8235f54941ed064913b (patch)
tree7cf1369eea2dca24358d86460fd9255df365aad3 /lib/Support/APSInt.cpp
parente420debd26300cbeb6af2722e3342132b2be1b3c (diff)
downloadllvm-4048a082847cea72431aa8235f54941ed064913b.tar.gz
llvm-4048a082847cea72431aa8235f54941ed064913b.tar.bz2
llvm-4048a082847cea72431aa8235f54941ed064913b.tar.xz
Added FoldingSet style 'profiling' support for APSInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46189 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APSInt.cpp')
-rw-r--r--lib/Support/APSInt.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Support/APSInt.cpp b/lib/Support/APSInt.cpp
new file mode 100644
index 0000000000..73acafa690
--- /dev/null
+++ b/lib/Support/APSInt.cpp
@@ -0,0 +1,23 @@
+//===-- llvm/ADT/APSInt.cpp - Arbitrary Precision Signed Int ---*- C++ -*--===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the APSInt class, which is a simple class that
+// represents an arbitrary sized integer that knows its signedness.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/APSInt.h"
+#include "llvm/ADT/FoldingSet.h"
+
+using namespace llvm;
+
+void APSInt::Profile(FoldingSetNodeID& ID) const {
+ ID.AddInteger((unsigned) (IsUnsigned ? 1 : 0));
+ APInt::Profile(ID);
+}