diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp
index c2811fb8ab5b2aee39d74df45f7534b130a8b2d9..feb1fa30833837ae07896fa05ced27c150a3c223 100644
--- a/lib/AST/MicrosoftMangle.cpp
+++ b/lib/AST/MicrosoftMangle.cpp
@@ -317,7 +317,7 @@ void MicrosoftCXXNameMangler::mangleNumber(const llvm::APSInt &Value) {
     char Encoding[64];
     char *EndPtr = Encoding+sizeof(Encoding);
     char *CurPtr = EndPtr;
-    llvm::APSInt NibbleMask(Value.getBitWidth());
+    llvm::APSInt NibbleMask(Value.getBitWidth(), Value.isUnsigned());
     NibbleMask = 0xf;
     for (int i = 0, e = Value.getActiveBits() / 4; i != e; ++i) {
       *--CurPtr = 'A' + Value.And(NibbleMask).lshr(i*4).getLimitedValue(0xf);