Skip to content

Commit 4ef9110

Browse files
committed
[clang][IFS] Ignoring -Xlinker/-Xclang arguments in InterfaceStubs pass for now.
Many of the inputs to clang driver toolchain tools can be things other than files such as -Xclang and -Xlinker arguments. For now we don't take such tool pass-through type arguments (although having an -Xifs would be nice to have to replace things like -emit-merged-ifs). So because for the moment we are not doing any sort of argument pass-through, I am going to have InterfaceStubs Merger ignore any non-file type input arguments. Differential Revision: https://reviews.llvm.org/D70838
1 parent 26f0606 commit 4ef9110

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clang/lib/Driver/ToolChains/InterfaceStubs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ void Merger::ConstructJob(Compilation &C, const JobAction &JA,
4646
// Here we append the input files. If the input files are object files, then
4747
// we look for .ifs files present in the same location as the object files.
4848
for (const auto &Input : Inputs) {
49+
if (!Input.isFilename())
50+
continue;
4951
SmallString<128> InputFilename(Input.getFilename());
5052
if (Input.getType() == types::TY_Object)
5153
llvm::sys::path::replace_extension(InputFilename, ".ifs");
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// RUN: %clang -### -Xlinker -Bsymbolic -emit-interface-stubs 2>&1 | FileCheck %s
2+
// CHECK: Bsymbolic
3+
// CHECK-NOT: Bsymbolic

0 commit comments

Comments
 (0)