mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 13:46:13 +00:00
Don't call 'FilesToRemove[0]' when the vector is empty, even to compute
the address of it. Found by a checking STL implementation used on a dragonegg builder. Sorry about this one. =/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158582 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0b8b3ba21e
commit
29436629da
@ -189,7 +189,7 @@ void llvm::sys::SetInterruptFunction(void (*IF)()) {
|
||||
bool llvm::sys::RemoveFileOnSignal(const sys::Path &Filename,
|
||||
std::string* ErrMsg) {
|
||||
SignalsMutex.acquire();
|
||||
std::string *OldPtr = &FilesToRemove[0];
|
||||
std::string *OldPtr = FilesToRemove.empty() ? 0 : &FilesToRemove[0];
|
||||
FilesToRemove.push_back(Filename.str());
|
||||
|
||||
// We want to call 'c_str()' on every std::string in this vector so that if
|
||||
|
Loading…
Reference in New Issue
Block a user