mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
86af655521
commit
994a204570
@ -688,6 +688,11 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
|||||||
Record.clear();
|
Record.clear();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore all values in ValueList except for Constants.
|
||||||
|
if (V && (isa<Instruction>(V) || isa<Argument>(V)))
|
||||||
|
continue;
|
||||||
|
|
||||||
const Constant *C = cast<Constant>(V);
|
const Constant *C = cast<Constant>(V);
|
||||||
unsigned Code = -1U;
|
unsigned Code = -1U;
|
||||||
unsigned AbbrevToUse = 0;
|
unsigned AbbrevToUse = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user