diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-04-27 19:11:14 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-04-27 19:11:14 +0000 |
commit | 1865df49960e34cc90d0083b0e0cd4771c0feb35 (patch) | |
tree | e6c91dba6b86e3fc8970a42e8291771e32f82239 /clang/tools | |
parent | ee5be798dae30d5f9414b01f76ff807edbc881aa (diff) | |
download | bcm5719-llvm-1865df49960e34cc90d0083b0e0cd4771c0feb35.tar.gz bcm5719-llvm-1865df49960e34cc90d0083b0e0cd4771c0feb35.zip |
s/LLVM_ON_WIN32/_WIN32/, clang
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: 331069
Diffstat (limited to 'clang/tools')
-rw-r--r-- | clang/tools/driver/driver.cpp | 4 | ||||
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 2 | ||||
-rw-r--r-- | clang/tools/libclang/CIndexer.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp index 1913996aebb..c83e1036eb7 100644 --- a/clang/tools/driver/driver.cpp +++ b/clang/tools/driver/driver.cpp @@ -485,7 +485,7 @@ int main(int argc_, const char **argv_) { // On Windows, abort will return an exit code of 3. In these cases, // generate additional diagnostic information if possible. bool DiagnoseCrash = CommandRes < 0 || CommandRes == 70; -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 DiagnoseCrash |= CommandRes == 3; #endif if (DiagnoseCrash) { @@ -501,7 +501,7 @@ int main(int argc_, const char **argv_) { // results now. This happens in -disable-free mode. llvm::TimerGroup::printAll(llvm::errs()); -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 // Exit status should not be negative on Win32, unless abnormal termination. // Once abnormal termiation was caught, negative status should not be // propagated. diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 497a3ca8f54..380723108ce 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -8472,7 +8472,7 @@ void cxindex::printDiagsToStderr(ASTUnit *Unit) { fprintf(stderr, "%s\n", clang_getCString(Msg)); clang_disposeString(Msg); } -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 // On Windows, force a flush, since there may be multiple copies of // stderr and stdout in the file system, all with different buffers // but writing to the same device. diff --git a/clang/tools/libclang/CIndexer.cpp b/clang/tools/libclang/CIndexer.cpp index 30054ea9f79..4c63e14ad5c 100644 --- a/clang/tools/libclang/CIndexer.cpp +++ b/clang/tools/libclang/CIndexer.cpp @@ -28,10 +28,10 @@ #ifdef __CYGWIN__ #include <cygwin/version.h> #include <sys/cygwin.h> -#define LLVM_ON_WIN32 1 +#define _WIN32 1 #endif -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 #include <windows.h> #else #include <dlfcn.h> @@ -47,7 +47,7 @@ const std::string &CIndexer::getClangResourcesPath() { SmallString<128> LibClangPath; // Find the location where this library lives (libclang.dylib). -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 MEMORY_BASIC_INFORMATION mbi; char path[MAX_PATH]; VirtualQuery((void *)(uintptr_t)clang_createTranslationUnit, &mbi, |