summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-12 13:59:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-12 13:59:17 +0000
commitddee9b46917d10e7d854011d275b77ad41693726 (patch)
treebfc174f6475b98f497cf8a0a285058c6a948ef06 /lib/Support
parentf90690f202901c7f6ba633bc144c9de9247b1834 (diff)
downloadllvm-ddee9b46917d10e7d854011d275b77ad41693726.tar.gz
llvm-ddee9b46917d10e7d854011d275b77ad41693726.tar.bz2
llvm-ddee9b46917d10e7d854011d275b77ad41693726.tar.xz
Remove Path::createFileOnDisk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183827 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Unix/Path.inc10
-rw-r--r--lib/Support/Windows/Path.inc12
2 files changed, 0 insertions, 22 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index 201a7c9a66..39538d0e06 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -585,16 +585,6 @@ Path::createDirectoryOnDisk( bool create_parents, std::string* ErrMsg ) {
}
bool
-Path::createFileOnDisk(std::string* ErrMsg) {
- // Create the file
- int fd = ::creat(path.c_str(), S_IRUSR | S_IWUSR);
- if (fd < 0)
- return MakeErrMsg(ErrMsg, path + ": can't create file");
- ::close(fd);
- return false;
-}
-
-bool
Path::createTemporaryFileOnDisk(bool reuse_current, std::string* ErrMsg) {
// Make this into a unique file name
if (makeUnique( reuse_current, ErrMsg ))
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc
index 5ee1e0abf8..b5a703a151 100644
--- a/lib/Support/Windows/Path.inc
+++ b/lib/Support/Windows/Path.inc
@@ -560,18 +560,6 @@ Path::createDirectoryOnDisk(bool create_parents, std::string* ErrMsg) {
}
bool
-Path::createFileOnDisk(std::string* ErrMsg) {
- // Create the file
- HANDLE h = CreateFile(path.c_str(), GENERIC_WRITE, 0, NULL, CREATE_NEW,
- FILE_ATTRIBUTE_NORMAL, NULL);
- if (h == INVALID_HANDLE_VALUE)
- return MakeErrMsg(ErrMsg, path + ": Can't create file: ");
-
- CloseHandle(h);
- return false;
-}
-
-bool
Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const {
WIN32_FILE_ATTRIBUTE_DATA fi;
if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi))