1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Don't call back() on an empty SmallVector. Found by -fsanitize=enum!

llvm-svn: 170968
This commit is contained in:
Richard Smith 2012-12-22 00:15:13 +00:00
parent df77ac1ba8
commit 80529530ef

View File

@ -516,7 +516,7 @@ void Output::output(StringRef s) {
void Output::outputUpToEndOfLine(StringRef s) {
this->output(s);
if (StateStack.back() != inFlowSeq)
if (StateStack.empty() || StateStack.back() != inFlowSeq)
NeedsNewLine = true;
}