diff options
-rw-r--r-- | clang/lib/Tooling/JSONCompilationDatabase.cpp | 3 | ||||
-rw-r--r-- | clang/unittests/Tooling/CompilationDatabaseTest.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp index 67a42d3..4aa1685 100644 --- a/clang/lib/Tooling/JSONCompilationDatabase.cpp +++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp @@ -272,7 +272,8 @@ static bool unwrapCommand(std::vector<std::string> &Args) { return false; StringRef Wrapper = stripExecutableExtension(llvm::sys::path::filename(Args.front())); - if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache") { + if (Wrapper == "distcc" || Wrapper == "gomacc" || Wrapper == "ccache" || + Wrapper == "sccache") { // Most of these wrappers support being invoked 3 ways: // `distcc g++ file.c` This is the mode we're trying to match. // We need to drop `distcc`. diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp index 3bfb0ec..9e23428 100644 --- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp +++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp @@ -383,6 +383,7 @@ TEST(findCompileArgsInJsonDatabase, ParsesCompilerWrappers) { std::vector<std::pair<std::string, std::string>> Cases = { {"distcc gcc foo.c", "gcc foo.c"}, {"gomacc clang++ foo.c", "clang++ foo.c"}, + {"sccache clang++ foo.c", "clang++ foo.c"}, {"ccache gcc foo.c", "gcc foo.c"}, {"ccache.exe gcc foo.c", "gcc foo.c"}, {"ccache g++.exe foo.c", "g++.exe foo.c"}, |