[PATCH] D70838: [clang][IFS] Ignoring -Xlinker/-Xclang arguments in InterfaceStubs pass for now.

Puyan Lotfi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 28 22:48:28 PST 2019


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");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70838.231477.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191129/8ee24e9c/attachment.bin>


More information about the cfe-commits mailing list