projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb39aa0
)
Don't dereference begin() on an empty vector.
author
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Thu, 27 Sep 2012 21:05:59 +0000
(21:05 +0000)
committer
Jakob Stoklund Olesen
<stoklund@2pi.dk>
Thu, 27 Sep 2012 21:05:59 +0000
(21:05 +0000)
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
lib/CodeGen/LiveInterval.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/LiveInterval.cpp
b/lib/CodeGen/LiveInterval.cpp
index f4ebcd6fa45f09e20b2375eb12c24832dd738131..c3bf2d234c0a0835ed4f306331c815e8d962cbbb 100644
(file)
--- a/
lib/CodeGen/LiveInterval.cpp
+++ b/
lib/CodeGen/LiveInterval.cpp
@@
-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();