mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 16:25:18 +00:00
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -371,7 +371,7 @@ bool StringRef::getAsInteger(unsigned Radix, APInt &Result) const {
|
||||
if (BitWidth < Result.getBitWidth())
|
||||
BitWidth = Result.getBitWidth(); // don't shrink the result
|
||||
else
|
||||
Result.zext(BitWidth);
|
||||
Result = Result.zext(BitWidth);
|
||||
|
||||
APInt RadixAP, CharAP; // unused unless !IsPowerOf2Radix
|
||||
if (!IsPowerOf2Radix) {
|
||||
|
Reference in New Issue
Block a user