Don't crash when the Assignments vector is empty.

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

llvm-svn: 166398
This commit is contained in:
Jakob Stoklund Olesen 2012-10-21 19:05:03 +00:00
parent 56ac181189
commit fd4ced2c52
1 changed files with 1 additions and 1 deletions

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