aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Driver/ToolChainTest.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2021-07-26 13:30:58 +0200
committerJan Svoboda <jan_svoboda@apple.com>2021-07-27 09:18:58 +0200
commitb76c7c6faf06bb02b7b7b6bba3f6eb8a33edcdca (patch)
tree50bbbf5a436e92d35c0904caa72d5801fde3288b /clang/unittests/Driver/ToolChainTest.cpp
parent60426f33b1d417763ca1954fba5293c959c9623d (diff)
downloadllvm-b76c7c6faf06bb02b7b7b6bba3f6eb8a33edcdca.zip
llvm-b76c7c6faf06bb02b7b7b6bba3f6eb8a33edcdca.tar.gz
llvm-b76c7c6faf06bb02b7b7b6bba3f6eb8a33edcdca.tar.bz2
[clang][driver] NFC: Expose InputInfo in Job instead of plain filenames
This patch exposes `InputInfo` in `Job` instead of plain filenames. This is useful in a follow-up patch that uses this to recognize `-cc1` commands interesting for Clang tooling. Depends on D106787. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D106788
Diffstat (limited to 'clang/unittests/Driver/ToolChainTest.cpp')
-rw-r--r--clang/unittests/Driver/ToolChainTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index 87f476c..253c65d 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -321,13 +321,13 @@ TEST(ToolChainTest, CommandOutput) {
const JobList &Jobs = CC->getJobs();
const auto &CmdCompile = Jobs.getJobs().front();
- const auto &InFile = CmdCompile->getInputFilenames().front();
+ const auto &InFile = CmdCompile->getInputInfos().front().getFilename();
EXPECT_STREQ(InFile, "foo.cpp");
auto ObjFile = CmdCompile->getOutputFilenames().front();
EXPECT_TRUE(StringRef(ObjFile).endswith(".o"));
const auto &CmdLink = Jobs.getJobs().back();
- const auto LinkInFile = CmdLink->getInputFilenames().front();
+ const auto LinkInFile = CmdLink->getInputInfos().front().getFilename();
EXPECT_EQ(ObjFile, LinkInFile);
auto ExeFile = CmdLink->getOutputFilenames().front();
EXPECT_EQ("a.out", ExeFile);