Index: include/llvm/ADT/APSInt.h
===================================================================
--- include/llvm/ADT/APSInt.h	(revision 62979)
+++ include/llvm/ADT/APSInt.h	(working copy)
@@ -238,14 +238,14 @@
   ///  with the given bit width and signedness.
   static APSInt getMaxValue(uint32_t numBits, bool Signed) {
     return APSInt(Signed ? APInt::getSignedMaxValue(numBits)
-                         : APInt::getMaxValue(numBits), Signed);
+                         : APInt::getMaxValue(numBits), !Signed);
   }
 
   /// getMinValue - Return the APSInt representing the minimum integer value
   ///  with the given bit width and signedness.
   static APSInt getMinValue(uint32_t numBits, bool Signed) {
     return APSInt(Signed ? APInt::getSignedMinValue(numBits)
-                         : APInt::getMinValue(numBits), Signed);
+                         : APInt::getMinValue(numBits), !Signed);
   }
 
   /// Profile - Used to insert APSInt objects, or objects that contain APSInt
