Bring back the empty vector workaround I removed in r106839. Looks like MSVC needs it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106841 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-06-25 12:51:01 +00:00
parent d4d1f85aa7
commit 7262c19c41

View File

@ -292,5 +292,6 @@ MemoryBuffer *MemoryBuffer::getSTDIN(std::string *ErrStr) {
return 0;
}
return getMemBufferCopy(StringRef(&FileData[0], FileData.size()), "<stdin>");
FileData.push_back(0); // &FileData[Size] is invalid. So is &*FileData.end().
return getMemBufferCopy(StringRef(&FileData[0],FileData.size()-1), "<stdin>");
}