Author: zturner Date: Wed Aug 17 15:55:35 2016 New Revision: 278976 URL: http://llvm.org/viewvc/llvm-project?rev=278976&view=rev Log: 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. Modified: cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp Modified: cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp?rev=278976&r1=278975&r2=278976&view=diff ============================================================================== --- cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp (original) +++ cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp Wed Aug 17 15:55:35 2016 @@ -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 <system_error> namespace clang { @@ -116,21 +113,6 @@ class CommandLineArgumentParser { std::vector<std::string> 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<const char *, 64> T; - llvm::cl::TokenizeWindowsCommandLine(EscapedCommandLine, Saver, T); - std::vector<std::string> Result(T.begin(), T.end()); - return Result; - } - } - CommandLineArgumentParser parser(EscapedCommandLine); return parser.parse(); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits