forked from OSchip/llvm-project
s/LLVM_ON_WIN32/_WIN32/, clang-tools-extra
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change. llvm-svn: 329695
This commit is contained in:
parent
074cef3dfb
commit
0da2290958
|
@ -38,7 +38,7 @@ public:
|
|||
"Expect URI body to be an absolute path starting with '/': " + Body,
|
||||
llvm::inconvertibleErrorCode());
|
||||
Body = Body.ltrim('/');
|
||||
#ifdef LLVM_ON_WIN32
|
||||
#ifdef _WIN32
|
||||
constexpr char TestDir[] = "C:\\clangd-test";
|
||||
#else
|
||||
constexpr char TestDir[] = "/clangd-test";
|
||||
|
|
|
@ -286,7 +286,7 @@ TEST_F(SymbolCollectorTest, SymbolRelativeWithFallback) {
|
|||
UnorderedElementsAre(AllOf(QName("Foo"), DeclURI(TestHeaderURI))));
|
||||
}
|
||||
|
||||
#ifndef LLVM_ON_WIN32
|
||||
#ifndef _WIN32
|
||||
TEST_F(SymbolCollectorTest, CustomURIScheme) {
|
||||
// Use test URI scheme from URITests.cpp
|
||||
CollectorOpts.URISchemes.insert(CollectorOpts.URISchemes.begin(), "unittest");
|
||||
|
@ -571,7 +571,7 @@ TEST_F(SymbolCollectorTest, IncludeHeaderSameAsFileURI) {
|
|||
IncludeHeader(TestHeaderURI))));
|
||||
}
|
||||
|
||||
#ifndef LLVM_ON_WIN32
|
||||
#ifndef _WIN32
|
||||
TEST_F(SymbolCollectorTest, CanonicalSTLHeader) {
|
||||
CollectorOpts.CollectIncludePath = true;
|
||||
CanonicalIncludes Includes;
|
||||
|
|
|
@ -45,7 +45,7 @@ MockCompilationDatabase::getCompileCommand(PathRef File) const {
|
|||
}
|
||||
|
||||
const char *testRoot() {
|
||||
#ifdef LLVM_ON_WIN32
|
||||
#ifdef _WIN32
|
||||
return "C:\\clangd-test";
|
||||
#else
|
||||
return "/clangd-test";
|
||||
|
|
|
@ -93,7 +93,7 @@ std::string resolveOrDie(const URI &U, llvm::StringRef HintPath = "") {
|
|||
}
|
||||
|
||||
TEST(URITest, Create) {
|
||||
#ifdef LLVM_ON_WIN32
|
||||
#ifdef _WIN32
|
||||
EXPECT_THAT(createOrDie("c:\\x\\y\\z"), "file:///c%3a/x/y/z");
|
||||
#else
|
||||
EXPECT_THAT(createOrDie("/x/y/z"), "file:///x/y/z");
|
||||
|
@ -162,7 +162,7 @@ TEST(URITest, ParseFailed) {
|
|||
}
|
||||
|
||||
TEST(URITest, Resolve) {
|
||||
#ifdef LLVM_ON_WIN32
|
||||
#ifdef _WIN32
|
||||
EXPECT_THAT(resolveOrDie(parseOrDie("file:///c%3a/x/y/z")), "c:\\x\\y\\z");
|
||||
#else
|
||||
EXPECT_EQ(resolveOrDie(parseOrDie("file:/a/b/c")), "/a/b/c");
|
||||
|
|
Loading…
Reference in New Issue