mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-19 03:20:47 +00:00
Fix integer undefined behavior due to signed left shift overflow in LLVM.
Reviewed offline by chandlerc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162623 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -158,7 +158,7 @@ public:
|
||||
&& "Word Position outside of element");
|
||||
|
||||
// Mask off previous bits.
|
||||
Copy &= ~0L << BitPos;
|
||||
Copy &= ~0UL << BitPos;
|
||||
|
||||
if (Copy != 0) {
|
||||
if (sizeof(BitWord) == 4)
|
||||
|
||||
Reference in New Issue
Block a user