[llvm-commits] [llvm] r47338 - /llvm/trunk/lib/Support/APInt.cpp

Ted Kremenek kremenek at apple.com
Tue Feb 19 12:50:41 PST 2008


Author: kremenek
Date: Tue Feb 19 14:50:41 2008
New Revision: 47338

URL: http://llvm.org/viewvc/llvm-project?rev=47338&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Support/APInt.cpp

Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=47338&r1=47337&r2=47338&view=diff

==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Tue Feb 19 14:50:41 2008
@@ -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;





More information about the llvm-commits mailing list