diff options
Diffstat (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp')
-rw-r--r-- | clang/lib/Tooling/JSONCompilationDatabase.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp index 07292da..152508f 100644 --- a/clang/lib/Tooling/JSONCompilationDatabase.cpp +++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp @@ -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; } } |