Remove C++98 workaround in llvm::sys::DontRemoveFileOnSignal()

llvm-svn: 242920
This commit is contained in:
Yaron Keren 2015-07-22 18:23:51 +00:00
parent 397b0da8d7
commit c2bcf1549b
1 changed files with 0 additions and 7 deletions

View File

@ -268,13 +268,6 @@ void llvm::sys::DontRemoveFileOnSignal(StringRef Filename) {
std::vector<std::string>::iterator I = FilesToRemove->end(); std::vector<std::string>::iterator I = FilesToRemove->end();
if (RI != FilesToRemove->rend()) if (RI != FilesToRemove->rend())
I = FilesToRemove->erase(RI.base()-1); I = FilesToRemove->erase(RI.base()-1);
// We need to call c_str() on every element which would have been moved by
// the erase. These elements, in a C++98 implementation where c_str()
// requires a reallocation on the first call may have had the call to c_str()
// made on insertion become invalid by being copied down an element.
for (std::vector<std::string>::iterator E = FilesToRemove->end(); I != E; ++I)
I->c_str();
} }
/// AddSignalHandler - Add a function to be called when a signal is delivered /// AddSignalHandler - Add a function to be called when a signal is delivered