1 | //===- llvm/unittest/Support/Path.cpp - Path tests ------------------------===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #include "llvm/Support/Path.h" |
10 | #include "llvm/ADT/STLExtras.h" |
11 | #include "llvm/ADT/ScopeExit.h" |
12 | #include "llvm/ADT/SmallVector.h" |
13 | #include "llvm/BinaryFormat/Magic.h" |
14 | #include "llvm/Config/llvm-config.h" |
15 | #include "llvm/Support/Compiler.h" |
16 | #include "llvm/Support/ConvertUTF.h" |
17 | #include "llvm/Support/Duration.h" |
18 | #include "llvm/Support/Errc.h" |
19 | #include "llvm/Support/ErrorHandling.h" |
20 | #include "llvm/Support/FileSystem.h" |
21 | #include "llvm/Support/FileUtilities.h" |
22 | #include "llvm/Support/MemoryBuffer.h" |
23 | #include "llvm/Support/raw_ostream.h" |
24 | #include "llvm/TargetParser/Host.h" |
25 | #include "llvm/TargetParser/Triple.h" |
26 | #include "llvm/Testing/Support/Error.h" |
27 | #include "llvm/Testing/Support/SupportHelpers.h" |
28 | #include "gmock/gmock.h" |
29 | #include "gtest/gtest.h" |
30 | |
31 | #ifdef _WIN32 |
32 | #include "llvm/ADT/ArrayRef.h" |
33 | #include "llvm/Support/Chrono.h" |
34 | #include "llvm/Support/Windows/WindowsSupport.h" |
35 | #include <windows.h> |
36 | #include <winerror.h> |
37 | #endif |
38 | |
39 | #ifdef LLVM_ON_UNIX |
40 | #include <pwd.h> |
41 | #include <sys/stat.h> |
42 | #endif |
43 | |
44 | using namespace llvm; |
45 | using namespace llvm::sys; |
46 | |
47 | #define ASSERT_NO_ERROR(x) \ |
48 | if (std::error_code |