summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
diff options
context:
space:
mode:
authorTaewook Oh <twoh@fb.com>2016-06-04 03:36:12 +0000
committerTaewook Oh <twoh@fb.com>2016-06-04 03:36:12 +0000
commit99497fdebddbb9ee38f6b7dcaffa8a1e7167955e (patch)
tree95eef3b5012d0bf7b5c4f7afcd69f88f3a2b9940 /llvm/unittests/Support
parent57cd7ef1c96fa98e37085f211f20e1c7d52000b9 (diff)
downloadbcm5719-llvm-99497fdebddbb9ee38f6b7dcaffa8a1e7167955e.tar.gz
bcm5719-llvm-99497fdebddbb9ee38f6b7dcaffa8a1e7167955e.zip
Revert commit r271704, a patch that enables warnings for non-portable #include and #import paths (Corresponding clang patch has been reverted by r271761). Patches are reverted because they generate lots of unadressable warnings for windows and fail tests under ASAN.
llvm-svn: 271764
Diffstat (limited to 'llvm/unittests/Support')
-rw-r--r--llvm/unittests/Support/Path.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index 705a90bd0a3..ad2267d596c 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -995,61 +995,4 @@ TEST(Support, ReplacePathPrefix) {
path::replace_path_prefix(Path, OldPrefix, EmptyPrefix);
EXPECT_EQ(Path, "/foo");
}
-
-TEST_F(FileSystemTest, PathFromFD) {
- // Create a temp file.
- int FileDescriptor;
- SmallString<64> TempPath;
- ASSERT_NO_ERROR(
- fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath));
-
- // Make sure it exists.
- ASSERT_TRUE(sys::fs::exists(Twine(TempPath)));
-
- // Try to get the path from the file descriptor
- SmallString<64> ResultPath;
- std::error_code ErrorCode =
- fs::getPathFromOpenFD(FileDescriptor, ResultPath);
-
- // If we succeeded, check that the paths are the same (modulo case):
- if (!ErrorCode) {
- // The paths returned by createTemporaryFile and getPathFromOpenFD
- // should reference the same file on disk.
- fs::UniqueID D1, D2;
- ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), D1));
- ASSERT_NO_ERROR(fs::getUniqueID(Twine(ResultPath), D2));
- ASSERT_EQ(D1, D2);
- }
-
- ::close(FileDescriptor);
-}
-
-TEST_F(FileSystemTest, OpenFileForRead) {
- // Create a temp file.
- int FileDescriptor;
- SmallString<64> TempPath;
- ASSERT_NO_ERROR(
- fs::createTemporaryFile("prefix", "temp", FileDescriptor, TempPath));
-
- // Make sure it exists.
- ASSERT_TRUE(sys::fs::exists(Twine(TempPath)));
-
- // Open the file for read
- int FileDescriptor2;
- SmallString<64> ResultPath;
- ASSERT_NO_ERROR(
- fs::openFileForRead(Twine(TempPath), FileDescriptor2, &ResultPath))
-
- // If we succeeded, check that the paths are the same (modulo case):
- if (!ResultPath.empty()) {
- // The paths returned by createTemporaryFile and getPathFromOpenFD
- // should reference the same file on disk.
- fs::UniqueID D1, D2;
- ASSERT_NO_ERROR(fs::getUniqueID(Twine(TempPath), D1));
- ASSERT_NO_ERROR(fs::getUniqueID(Twine(ResultPath), D2));
- ASSERT_EQ(D1, D2);
- }
-
- ::close(FileDescriptor);
-}
} // anonymous namespace
OpenPOWER on IntegriCloud