mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Don't dereference begin() on an empty vector.
The fix is obvious and the only test case I have is horrible, so I am not including it. The problem shows up when self-hosting clang on i386 with -new-coalescer enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb39aa05af
commit
657720bc6e
@ -427,7 +427,7 @@ void LiveInterval::join(LiveInterval &Other,
|
||||
|
||||
// If we have to apply a mapping to our base interval assignment, rewrite it
|
||||
// now.
|
||||
if (MustMapCurValNos) {
|
||||
if (MustMapCurValNos && !empty()) {
|
||||
// Map the first live range.
|
||||
|
||||
iterator OutIt = begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user