From ba7a92c01e86b5048a93abe7c26c25b90ea9040a Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 21 Apr 2021 10:00:30 -0400 Subject: [Support] Don't include VirtualFileSystem.h in CommandLine.h CommandLine.h is indirectly included in ~50% of TUs when building clang, and VirtualFileSystem.h is large. (Already remarked by jhenderson on D70769.) No behavior change. Differential Revision: https://reviews.llvm.org/D100957 --- llvm/unittests/Support/CommandLineTest.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'llvm/unittests/Support/CommandLineTest.cpp') diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp index 4accdc5..bb6cc39 100644 --- a/llvm/unittests/Support/CommandLineTest.cpp +++ b/llvm/unittests/Support/CommandLineTest.cpp @@ -827,8 +827,8 @@ TEST(CommandLineTest, ResponseFiles) { llvm::BumpPtrAllocator A; llvm::StringSaver Saver(A); ASSERT_TRUE(llvm::cl::ExpandResponseFiles( - Saver, llvm::cl::TokenizeGNUCommandLine, Argv, false, true, FS, - /*CurrentDir=*/StringRef(TestRoot))); + Saver, llvm::cl::TokenizeGNUCommandLine, Argv, false, true, + /*CurrentDir=*/StringRef(TestRoot), FS)); EXPECT_THAT(Argv, testing::Pointwise( StringEquality(), {"test/test", "-flag_1", "-option_1", "-option_2", @@ -889,9 +889,9 @@ TEST(CommandLineTest, RecursiveResponseFiles) { #else cl::TokenizerCallback Tokenizer = cl::TokenizeGNUCommandLine; #endif - ASSERT_FALSE( - cl::ExpandResponseFiles(Saver, Tokenizer, Argv, false, false, FS, - /*CurrentDir=*/llvm::StringRef(TestRoot))); + ASSERT_FALSE(cl::ExpandResponseFiles(Saver, Tokenizer, Argv, false, false, + /*CurrentDir=*/llvm::StringRef(TestRoot), + FS)); EXPECT_THAT(Argv, testing::Pointwise(StringEquality(), @@ -929,8 +929,8 @@ TEST(CommandLineTest, ResponseFilesAtArguments) { BumpPtrAllocator A; StringSaver Saver(A); ASSERT_FALSE(cl::ExpandResponseFiles(Saver, cl::TokenizeGNUCommandLine, Argv, - false, false, FS, - /*CurrentDir=*/StringRef(TestRoot))); + false, false, + /*CurrentDir=*/StringRef(TestRoot), FS)); // ASSERT instead of EXPECT to prevent potential out-of-bounds access. ASSERT_EQ(Argv.size(), 1 + NON_RSP_AT_ARGS + 2); @@ -964,8 +964,8 @@ TEST(CommandLineTest, ResponseFileRelativePath) { BumpPtrAllocator A; StringSaver Saver(A); ASSERT_TRUE(cl::ExpandResponseFiles(Saver, cl::TokenizeGNUCommandLine, Argv, - false, true, FS, - /*CurrentDir=*/StringRef(TestRoot))); + false, true, + /*CurrentDir=*/StringRef(TestRoot), FS)); EXPECT_THAT(Argv, testing::Pointwise(StringEquality(), {"test/test", "-flag"})); } @@ -984,8 +984,8 @@ TEST(CommandLineTest, ResponseFileEOLs) { BumpPtrAllocator A; StringSaver Saver(A); ASSERT_TRUE(cl::ExpandResponseFiles(Saver, cl::TokenizeWindowsCommandLine, - Argv, true, true, FS, - /*CurrentDir=*/StringRef(TestRoot))); + Argv, true, true, + /*CurrentDir=*/StringRef(TestRoot), FS)); const char *Expected[] = {"clang", "-Xclang", "-Wno-whatever", nullptr, "input.cpp"}; ASSERT_EQ(array_lengthof(Expected), Argv.size()); -- cgit v1.1