aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/CommandLineTest.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-04-21 10:00:30 -0400
committerNico Weber <thakis@chromium.org>2021-04-21 10:19:01 -0400
commitba7a92c01e86b5048a93abe7c26c25b90ea9040a (patch)
tree4628efebcf9adf2bc38da4cb55b1db33cb986cbf /llvm/unittests/Support/CommandLineTest.cpp
parent2f69975683f5b6ea7df79f335f96b889a4bddecd (diff)
downloadllvm-ba7a92c01e86b5048a93abe7c26c25b90ea9040a.zip
llvm-ba7a92c01e86b5048a93abe7c26c25b90ea9040a.tar.gz
llvm-ba7a92c01e86b5048a93abe7c26c25b90ea9040a.tar.bz2
[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
Diffstat (limited to 'llvm/unittests/Support/CommandLineTest.cpp')
-rw-r--r--llvm/unittests/Support/CommandLineTest.cpp22
1 files changed, 11 insertions, 11 deletions
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());