summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
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
commit4875d2d99709de0fc87b7f017da64df547cf357e (patch)
tree13b0a882a4b0895a94f5a992fda458b2b97a55bd /llvm/lib/Support
parent5c75d54c5bc945b4e6cbf6b68315b30a01ad7112 (diff)
downloadbcm5719-llvm-4875d2d99709de0fc87b7f017da64df547cf357e.tar.gz
bcm5719-llvm-4875d2d99709de0fc87b7f017da64df547cf357e.zip
Added FoldingSet style 'profiling' support for APSInt.
llvm-svn: 46189
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APSInt.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/lib/Support/APSInt.cpp b/llvm/lib/Support/APSInt.cpp
new file mode 100644
index 00000000000..73acafa690c
--- /dev/null
+++ b/llvm/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);
+}
OpenPOWER on IntegriCloud