Don't crash when the Assignments vector is empty.

Reported by Vincent Lejeune using an out-of-tree target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2012-10-21 19:05:03 +00:00
parent 5bb5a75b1e
commit 56acf63e35

View File

@ -1302,7 +1302,7 @@ public:
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