plotfi created this revision. plotfi added reviewers: compnerd, cishida. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang.
I intend to add something like -Xifs, but for now if an InputArg is not a filename then I want to skip it. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70838 Files: clang/lib/Driver/ToolChains/InterfaceStubs.cpp clang/test/InterfaceStubs/XlinkerInputArgs.cpp Index: clang/test/InterfaceStubs/XlinkerInputArgs.cpp =================================================================== --- /dev/null +++ clang/test/InterfaceStubs/XlinkerInputArgs.cpp @@ -0,0 +1,3 @@ +// RUN: %clang -### -Xlinker -Bsymbolic -emit-interface-stubs 2>&1 | FileCheck %s +// CHECK: Bsymbolic +// CHECK-NOT: Bsymbolic Index: clang/lib/Driver/ToolChains/InterfaceStubs.cpp =================================================================== --- clang/lib/Driver/ToolChains/InterfaceStubs.cpp +++ clang/lib/Driver/ToolChains/InterfaceStubs.cpp @@ -46,6 +46,8 @@ // Here we append the input files. If the input files are object files, then // we look for .ifs files present in the same location as the object files. for (const auto &Input : Inputs) { + if (!Input.isFilename()) + continue; SmallString<128> InputFilename(Input.getFilename()); if (Input.getType() == types::TY_Object) llvm::sys::path::replace_extension(InputFilename, ".ifs");
Index: clang/test/InterfaceStubs/XlinkerInputArgs.cpp =================================================================== --- /dev/null +++ clang/test/InterfaceStubs/XlinkerInputArgs.cpp @@ -0,0 +1,3 @@ +// RUN: %clang -### -Xlinker -Bsymbolic -emit-interface-stubs 2>&1 | FileCheck %s +// CHECK: Bsymbolic +// CHECK-NOT: Bsymbolic Index: clang/lib/Driver/ToolChains/InterfaceStubs.cpp =================================================================== --- clang/lib/Driver/ToolChains/InterfaceStubs.cpp +++ clang/lib/Driver/ToolChains/InterfaceStubs.cpp @@ -46,6 +46,8 @@ // Here we append the input files. If the input files are object files, then // we look for .ifs files present in the same location as the object files. for (const auto &Input : Inputs) { + if (!Input.isFilename()) + continue; SmallString<128> InputFilename(Input.getFilename()); if (Input.getType() == types::TY_Object) llvm::sys::path::replace_extension(InputFilename, ".ifs");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits