diff options
author | Lang Hames <lhames@gmail.com> | 2012-05-27 21:39:49 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2012-05-27 21:39:49 +0000 |
commit | f17523b6d3d9ef1dbcb64b63d9bada7bdae194a7 (patch) | |
tree | cd02a30449739c610c827c690ef67d6d3dc9ee98 /lib/AST/MicrosoftMangle.cpp | |
parent | 350e956532d99ce2e804a478df5b6f1f5e096d88 (diff) |
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
Diffstat (limited to 'lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 6918ce4826..c2811fb8ab 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -317,10 +317,11 @@ void MicrosoftCXXNameMangler::mangleNumber(const llvm::APSInt &Value) { 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 << '@'; |