Author: Wenju He Date: 2025-06-07T08:05:13+08:00 New Revision: 8a51fb29b6f315f1ee0ba3b0b9f0f4a4c2b51dcc
URL: https://github.com/llvm/llvm-project/commit/8a51fb29b6f315f1ee0ba3b0b9f0f4a4c2b51dcc DIFF: https://github.com/llvm/llvm-project/commit/8a51fb29b6f315f1ee0ba3b0b9f0f4a4c2b51dcc.diff LOG: Revert "[Clang] Add resource_dir_EQ flag to CC1Option group (#140870)" (#142509) This reverts commit c7b8d6e1dcb0a277f95496cbc6bb27143afb80a6. Fix check-clang CodeGenTest.TestNonAlterTest regression, see https://github.com/llvm/llvm-project/pull/140870#issuecomment-2931610238 Added: Modified: clang/include/clang/Driver/Options.td clang/unittests/Tooling/ToolingTest.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index fd6deb22d404e..89c63fb3397d3 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -5899,7 +5899,7 @@ def resource_dir : Separate<["-"], "resource-dir">, HelpText<"The directory which holds the compiler resource files">, MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>; def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption]>, - Visibility<[ClangOption, CC1Option, CLOption, DXCOption, FlangOption]>, + Visibility<[ClangOption, CLOption, DXCOption, FlangOption]>, Alias<resource_dir>; def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>, Visibility<[ClangOption, FlangOption]>; diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp index 562f87d430e6f..32af4b6b3b359 100644 --- a/clang/unittests/Tooling/ToolingTest.cpp +++ b/clang/unittests/Tooling/ToolingTest.cpp @@ -771,25 +771,6 @@ TEST(ClangToolTest, BaseVirtualFileSystemUsage) { EXPECT_EQ(0, Tool.run(Action.get())); } -// Check -cc1 command doesn't fail. -TEST(ClangToolTest, CC1Arg) { - FixedCompilationDatabase Compilations("/", {"-cc1"}); - llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFileSystem( - new llvm::vfs::OverlayFileSystem(llvm::vfs::getRealFileSystem())); - llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> InMemoryFileSystem( - new llvm::vfs::InMemoryFileSystem); - OverlayFileSystem->pushOverlay(InMemoryFileSystem); - - InMemoryFileSystem->addFile( - "a.cpp", 0, llvm::MemoryBuffer::getMemBuffer("int main() {}")); - - ClangTool Tool(Compilations, std::vector<std::string>(1, "a.cpp"), - std::make_shared<PCHContainerOperations>(), OverlayFileSystem); - std::unique_ptr<FrontendActionFactory> Action( - newFrontendActionFactory<SyntaxOnlyAction>()); - EXPECT_EQ(0, Tool.run(Action.get())); -} - // Check getClangStripDependencyFileAdjuster doesn't strip args after -MD/-MMD. TEST(ClangToolTest, StripDependencyFileAdjuster) { FixedCompilationDatabase Compilations("/", {"-MD", "-c", "-MMD", "-w"}); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits