forked from OSchip/llvm-project
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. llvm-svn: 164793
This commit is contained in:
parent
2885a7088d
commit
4976d0df41
|
@ -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…
Reference in New Issue