OPTION("-force_flat_namespace", force__flat__namespace, Flag, INVALID, INVALID, "", 0, 0, 0)
OPTION("-foutput-class-dir=", foutput_class_dir_EQ, Joined, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fpascal-strings", fpascal_strings, Flag, clang_f_Group, INVALID, "", 0, 0, 0)
+OPTION("-fpch-preprocess", fpch_preprocess, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fpic", fpic, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fpie", fpie, Flag, f_Group, INVALID, "", 0, 0, 0)
OPTION("-fprint-source-range-info", fprint_source_range_info, Flag, clang_f_Group, INVALID, "", 0, 0, 0)
}
}
+void ArgList::ClaimAllArgs(options::ID Id0) const {
+ // FIXME: Make fast.
+ for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
+ const Arg *A = *it;
+ if (A->getOption().matches(Id0))
+ A->claim();
+ }
+}
+
//
InputArgList::InputArgList(const char **ArgBegin, const char **ArgEnd)
Args.MakeArgString(getToolChain().GetProgramPath(C, "clang-cc").c_str());
Dest.addCommand(new Command(Exec, CmdArgs));
+ // Claim some arguments which clang supports automatically.
+
+ // -fpch-preprocess is used with gcc to add a special marker in the
+ // -output to include the PCH file. Clang's PTH solution is
+ // -completely transparent, so we do not need to deal with it at
+ // -all.
+ Args.ClaimAllArgs(options::OPT_fpch_preprocess);
+
// Claim some arguments which clang doesn't support, but we don't
// care to warn the user about.