[llvm-commits] [llvm] r166398 - /llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Sun Oct 21 12:05:03 PDT 2012
Author: stoklund
Date: Sun Oct 21 14:05:03 2012
New Revision: 166398
URL: http://llvm.org/viewvc/llvm-project?rev=166398&view=rev
Log:
Don't crash when the Assignments vector is empty.
Reported by Vincent Lejeune using an out-of-tree target.
Modified:
llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
Modified: llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp?rev=166398&r1=166397&r2=166398&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterCoalescer.cpp Sun Oct 21 14:05:03 2012
@@ -1302,7 +1302,7 @@
SmallVectorImpl<unsigned> &ShrinkRegs);
/// Get the value assignments suitable for passing to LiveInterval::join.
- const int *getAssignments() const { return &Assignments[0]; }
+ const int *getAssignments() const { return Assignments.data(); }
};
} // end anonymous namespace
More information about the llvm-commits
mailing list