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
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 9886de8..bc5df9c 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -167,6 +167,8 @@
/// 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;