summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-13 21:01:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-13 21:01:17 +0000
commit6c3df8e93ece684f54a07d553085824f4e66984a (patch)
tree3fb0f82b8d79d9f548d22d7916a051a73aa20a86 /include
parentbbf97ea7d5832922b3c40b67701b5719bfcb772b (diff)
downloadllvm-6c3df8e93ece684f54a07d553085824f4e66984a.tar.gz
llvm-6c3df8e93ece684f54a07d553085824f4e66984a.tar.bz2
llvm-6c3df8e93ece684f54a07d553085824f4e66984a.tar.xz
Add a RemoveFileOnSignal that takes a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Signals.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h
index c0a489a4b8..db2fde5fb1 100644
--- a/include/llvm/Support/Signals.h
+++ b/include/llvm/Support/Signals.h
@@ -31,6 +31,10 @@ namespace sys {
/// @brief Remove a file if a fatal signal occurs.
bool RemoveFileOnSignal(const Path &Filename, std::string* ErrMsg = 0);
+ inline bool RemoveFileOnSignal(StringRef Filename, std::string* ErrMsg = 0) {
+ return RemoveFileOnSignal(sys::Path(Filename), ErrMsg);
+ }
+
/// This function removes a file from the list of files to be removed on
/// signal delivery.
void DontRemoveFileOnSignal(const Path &Filename);