Fix -Wunused-function in a non-Win32 build
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 17 Nov 2015 20:38:54 +0000 (20:38 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 17 Nov 2015 20:38:54 +0000 (20:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253373 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Support/Path.cpp

index e325f9a..3f626f8 100644 (file)
@@ -360,6 +360,7 @@ TEST(Support, TempDirectory) {
   EXPECT_TRUE(!TempDir.empty());
 }
 
   EXPECT_TRUE(!TempDir.empty());
 }
 
+#ifdef LLVM_ON_WIN32
 static std::string path2regex(std::string Path) {
   size_t Pos = 0;
   while ((Pos = Path.find('\\', Pos)) != std::string::npos) {
 static std::string path2regex(std::string Path) {
   size_t Pos = 0;
   while ((Pos = Path.find('\\', Pos)) != std::string::npos) {
@@ -381,7 +382,6 @@ static std::string path2regex(std::string Path) {
       },                                                                       \
       ::testing::ExitedWithCode(0), path2regex(expected))
 
       },                                                                       \
       ::testing::ExitedWithCode(0), path2regex(expected))
 
-#ifdef LLVM_ON_WIN32
 TEST(SupportDeathTest, TempDirectoryOnWindows) {
   // In this test we want to check how system_temp_directory responds to
   // different values of specific env vars. To prevent corrupting env vars of
 TEST(SupportDeathTest, TempDirectoryOnWindows) {
   // In this test we want to check how system_temp_directory responds to
   // different values of specific env vars. To prevent corrupting env vars of