[cfe-commits] r157547 - /cfe/trunk/lib/AST/MicrosoftMangle.cpp
Lang Hames
lhames at gmail.com
Sun May 27 14:39:50 PDT 2012
Author: lhames
Date: Sun May 27 16:39:49 2012
New Revision: 157547
URL: http://llvm.org/viewvc/llvm-project?rev=157547&view=rev
Log:
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.
Modified:
cfe/trunk/lib/AST/MicrosoftMangle.cpp
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=157547&r1=157546&r2=157547&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Sun May 27 16:39:49 2012
@@ -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 << '@';
More information about the cfe-commits
mailing list