summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-19 20:50:41 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-19 20:50:41 +0000
commit901540f118cd091626cacb67ece23ef11fbbff41 (patch)
treeed93c699b49bd7a267492116c10b2fb727621f03 /llvm/lib/Support
parent4aa9e208faca61a22493d4d731aa4f9cbe900399 (diff)
downloadbcm5719-llvm-901540f118cd091626cacb67ece23ef11fbbff41.tar.gz
bcm5719-llvm-901540f118cd091626cacb67ece23ef11fbbff41.zip
Fixed bug in APInt::Profile() where the BitWidth field was not included in the
profile of the APSInt object. This caused unexpected Profile collisions where none should have occurred. llvm-svn: 47338
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APInt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 9886de83dc4..bc5df9cf479 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -167,6 +167,8 @@ APInt& APInt::operator=(uint64_t RHS) {
/// Profile - This method 'profiles' an APInt for use with FoldingSet.
void APInt::Profile(FoldingSetNodeID& ID) const {
+ ID.AddInteger(BitWidth);
+
if (isSingleWord()) {
ID.AddInteger(VAL);
return;
OpenPOWER on IntegriCloud