From 143a937f79e8117ba3bace743d8476ab9dea0ba2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 22 Dec 2016 19:11:42 +0000 Subject: [PATCH] Build KillTheDoctor with mingw-w64 compiler-rt uses it in its lit tests. llvm-svn: 290357 --- llvm/CMakeLists.txt | 2 +- llvm/utils/KillTheDoctor/KillTheDoctor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index f209338..64b33f2 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -878,7 +878,7 @@ if( LLVM_INCLUDE_TESTS ) endif() add_subdirectory(test) add_subdirectory(unittests) - if (MSVC) + if (WIN32) # This utility is used to prevent crashing tests from calling Dr. Watson on # Windows. add_subdirectory(utils/KillTheDoctor) diff --git a/llvm/utils/KillTheDoctor/KillTheDoctor.cpp b/llvm/utils/KillTheDoctor/KillTheDoctor.cpp index c9e9661..b3ec134 100644 --- a/llvm/utils/KillTheDoctor/KillTheDoctor.cpp +++ b/llvm/utils/KillTheDoctor/KillTheDoctor.cpp @@ -349,7 +349,7 @@ int main(int argc, char **argv) { ::_set_error_mode(_OUT_TO_STDERR); BOOL success = ::CreateProcessA(ProgramToRun.c_str(), - LPSTR(CommandLine.c_str()), + const_cast(CommandLine.c_str()), NULL, NULL, FALSE, -- 2.7.4