Author: zturner Date: Thu Aug 18 14:42:00 2016 New Revision: 279122 URL: http://llvm.org/viewvc/llvm-project?rev=279122&view=rev Log: Fix json compilation database syntax on non-Windows.
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=279122&r1=279121&r2=279122&view=diff ============================================================================== --- cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp (original) +++ cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp Thu Aug 18 14:42:00 2016 @@ -117,16 +117,14 @@ class CommandLineArgumentParser { std::vector<std::string> unescapeCommandLine(JSONCommandLineSyntax Syntax, StringRef EscapedCommandLine) { if (Syntax == JSONCommandLineSyntax::AutoDetect) { + Syntax = JSONCommandLineSyntax::Gnu; 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. + // explicitly tells us otherwise. if (!Triple.hasEnvironment() || Triple.getEnvironment() == llvm::Triple::EnvironmentType::MSVC) Syntax = JSONCommandLineSyntax::Windows; - else - Syntax = JSONCommandLineSyntax::Gnu; } } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits