Fix call to APSInt constructor - it doesn't take an initial value, just a
bitwidth and signedness. Also rename the variable to reflect its purpose.
No test case - discovered during random code exploration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157547 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp
index 6918ce4..c2811fb 100644
--- a/lib/AST/MicrosoftMangle.cpp
+++ b/lib/AST/MicrosoftMangle.cpp
@@ -317,10 +317,11 @@
char Encoding[64];
char *EndPtr = Encoding+sizeof(Encoding);
char *CurPtr = EndPtr;
- llvm::APSInt Fifteen(Value.getBitWidth(), 15);
+ llvm::APSInt NibbleMask(Value.getBitWidth());
+ NibbleMask = 0xf;
for (int i = 0, e = Value.getActiveBits() / 4; i != e; ++i) {
- *--CurPtr = 'A' + Value.And(Fifteen).lshr(i*4).getLimitedValue(15);
- Fifteen = Fifteen.shl(4);
+ *--CurPtr = 'A' + Value.And(NibbleMask).lshr(i*4).getLimitedValue(0xf);
+ NibbleMask = NibbleMask.shl(4);
};
Out.write(CurPtr, EndPtr-CurPtr);
Out << '@';