From: Yaron Keren Date: Wed, 22 Jul 2015 18:23:51 +0000 (+0000) Subject: Remove C++98 workaround in llvm::sys::DontRemoveFileOnSignal() X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1a737f5714980d1a28bdfe8676aa23ebe15cb1a2;p=oota-llvm.git Remove C++98 workaround in llvm::sys::DontRemoveFileOnSignal() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242920 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Unix/Signals.inc b/lib/Support/Unix/Signals.inc index bfe2a3a380e..68e10435c7f 100644 --- a/lib/Support/Unix/Signals.inc +++ b/lib/Support/Unix/Signals.inc @@ -268,13 +268,6 @@ void llvm::sys::DontRemoveFileOnSignal(StringRef Filename) { std::vector::iterator I = FilesToRemove->end(); if (RI != FilesToRemove->rend()) 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::iterator E = FilesToRemove->end(); I != E; ++I) - I->c_str(); } /// AddSignalHandler - Add a function to be called when a signal is delivered