<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 12:10 PM, Steven Wu <span dir="ltr"><<a href="mailto:stevenwu@apple.com" target="_blank">stevenwu@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi bob.wilson,<br>
<br>
-iframework option is used to specified System framework path so the<br>
path specified should be passed to linker as -F option<br>
rdar://problem/18234544<br>
<br>
<a href="http://reviews.llvm.org/D7106" target="_blank">http://reviews.llvm.org/D7106</a><br>
<br>
Files:<br>
  lib/Driver/Tools.cpp<br>
  test/Driver/darwin-ld.c<br>
<br>
Index: lib/Driver/Tools.cpp<br>
===================================================================<br>
--- lib/Driver/Tools.cpp<br>
+++ lib/Driver/Tools.cpp<br>
@@ -5964,6 +5964,12 @@<br>
   Args.AddAllArgs(CmdArgs, options::OPT_T_Group);<br>
   Args.AddAllArgs(CmdArgs, options::OPT_F);<br>
<br>
+  // -iframework should be forwarded as -F.<br>
+  for (arg_iterator it = Args.filtered_begin(options::OPT_iframework),<br>
+         ie = Args.filtered_end(); it != ie; ++it) {<br></blockquote><div><br>If you like, you could use:<br><br>  for (const auto &thing : make_range(Args.filtered_begin(options::OPT_iframework), Args.filtered_end()))<br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+    CmdArgs.push_back(Args.MakeArgString(std::string("-F") + (*it)->getValue()));<br>
+  }<br></blockquote><div><br>& we usually omit the braces from single-line (or single statement, depending on preference) blocks.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
   const char *Exec =<br>
     Args.MakeArgString(getToolChain().GetLinkerPath());<br>
   std::unique_ptr<Command> Cmd =<br>
Index: test/Driver/darwin-ld.c<br>
===================================================================<br>
--- test/Driver/darwin-ld.c<br>
+++ test/Driver/darwin-ld.c<br>
@@ -204,3 +204,9 @@<br>
 // RUN: FileCheck -check-prefix=LINK_IOS_SIMULATOR_VERSION_MIN %s < %t.log<br>
 // LINK_IPHONEOS_VERSION_MIN: -iphoneos_version_min<br>
 // LINK_IOS_SIMULATOR_VERSION_MIN: -ios_simulator_version_min<br>
+<br>
+// Check -iframework gets forward to ld as -F<br>
+// RUN: %clang -target x86_64-apple-darwin %s -iframework Bar -framework Foo -### 2>&1 | \<br>
+// RUN:   FileCheck --check-prefix=LINK-IFRAMEWORK %s<br>
+// LINK-IFRAMEWORK: {{ld(.exe)?"}}<br>
+// LINK-IFRAMEWORK: "-FBar"<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>