[clang-tools-extra] r329695 - s/LLVM_ON_WIN32/_WIN32/, clang-tools-extra
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 10 06:14:03 PDT 2018
Author: nico
Date: Tue Apr 10 06:14:03 2018
New Revision: 329695
URL: http://llvm.org/viewvc/llvm-project?rev=329695&view=rev
Log:
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.
Modified:
clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp
clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp
clang-tools-extra/trunk/unittests/clangd/TestFS.cpp
clang-tools-extra/trunk/unittests/clangd/URITests.cpp
Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp?rev=329695&r1=329694&r2=329695&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp Tue Apr 10 06:14:03 2018
@@ -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";
Modified: clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp?rev=329695&r1=329694&r2=329695&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.cpp Tue Apr 10 06:14:03 2018
@@ -286,7 +286,7 @@ TEST_F(SymbolCollectorTest, SymbolRelati
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, IncludeHeade
IncludeHeader(TestHeaderURI))));
}
-#ifndef LLVM_ON_WIN32
+#ifndef _WIN32
TEST_F(SymbolCollectorTest, CanonicalSTLHeader) {
CollectorOpts.CollectIncludePath = true;
CanonicalIncludes Includes;
Modified: clang-tools-extra/trunk/unittests/clangd/TestFS.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/TestFS.cpp?rev=329695&r1=329694&r2=329695&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/TestFS.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/TestFS.cpp Tue Apr 10 06:14:03 2018
@@ -45,7 +45,7 @@ MockCompilationDatabase::getCompileComma
}
const char *testRoot() {
-#ifdef LLVM_ON_WIN32
+#ifdef _WIN32
return "C:\\clangd-test";
#else
return "/clangd-test";
Modified: clang-tools-extra/trunk/unittests/clangd/URITests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/URITests.cpp?rev=329695&r1=329694&r2=329695&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/URITests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/URITests.cpp Tue Apr 10 06:14:03 2018
@@ -93,7 +93,7 @@ std::string resolveOrDie(const URI &U, l
}
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");
More information about the cfe-commits
mailing list