From: Zachary Turner Date: Wed, 17 Aug 2016 20:55:35 +0000 (+0000) Subject: Revert "[Tooling] Parse compilation database command lines on Windows." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f8d27f82a031afc0bbb99c9a109d0ab559b7f075;p=clang Revert "[Tooling] Parse compilation database command lines on Windows." This reverts commit 27a874790fc79f6391ad3703d7c790f51ac6ae1f. After the introduction of windows command line parsing, some unit tests began failing that expect to test gnu style command line quirks. The fix is mechanical but time consuming, so revert this for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278976 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Tooling/JSONCompilationDatabase.cpp b/lib/Tooling/JSONCompilationDatabase.cpp index 5f192f793a..299fbdc149 100644 --- a/lib/Tooling/JSONCompilationDatabase.cpp +++ b/lib/Tooling/JSONCompilationDatabase.cpp @@ -16,10 +16,7 @@ #include "clang/Tooling/CompilationDatabasePluginRegistry.h" #include "clang/Tooling/Tooling.h" #include "llvm/ADT/SmallString.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/CommandLine.h" #include "llvm/Support/Path.h" -#include "llvm/Support/StringSaver.h" #include namespace clang { @@ -116,21 +113,6 @@ class CommandLineArgumentParser { std::vector unescapeCommandLine( StringRef EscapedCommandLine) { - llvm::Triple Triple(llvm::sys::getProcessTriple()); - if (Triple.getOS() == llvm::Triple::OSType::Win32) { - // Assume Windows command line parsing on Win32 unless the triple explicitly - // tells us otherwise. - if (!Triple.hasEnvironment() || - Triple.getEnvironment() == llvm::Triple::EnvironmentType::MSVC) { - llvm::BumpPtrAllocator Alloc; - llvm::StringSaver Saver(Alloc); - llvm::SmallVector T; - llvm::cl::TokenizeWindowsCommandLine(EscapedCommandLine, Saver, T); - std::vector Result(T.begin(), T.end()); - return Result; - } - } - CommandLineArgumentParser parser(EscapedCommandLine); return parser.parse(); }