This is an archive of the discontinued LLVM Phabricator instance.

[Tooling][JSONCompilationDatabase] Fix backslash escaping on Windows
AbandonedPublic

Authored by lh123 on Nov 12 2019, 11:02 PM.

Details

Summary

We should always use TokenizeWindowsCommandLine on Windows.

When compiling clangd with MinGW-W64, Triple.getEnvironment will return EnvironmentType::GNU.

fixes https://github.com/clangd/clangd/issues/92.

Diff Detail

Event Timeline

lh123 created this revision.Nov 12 2019, 11:02 PM
lh123 marked an inline comment as done.Nov 13 2019, 12:52 AM
lh123 added inline comments.
clang/lib/Tooling/JSONCompilationDatabase.cpp
153

I think we can use TokenizeGNUCommandLine instead of CommandLineArgumentParser.

lh123 retitled this revision from [JSONCompilationDatabase] Fix backslash escaping on Windows to [Tooling][JSONCompilationDatabase] Fix backslash escaping on Windows.Nov 13 2019, 12:54 AM
lh123 abandoned this revision.Jun 24 2020, 10:44 AM