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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith 2012-12-22 00:15:13 +00:00
parent d0696ef8c3
commit 2b45dd58b2

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;
}