diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index c330707d34cb..8a7f2463eb4f 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -328,6 +328,7 @@ void Driver::BuildUniversalActions(const ArgList &Args, // FIXME: We need to handle canonicalization of the specified // arch? + A->claim(); if (ArchNames.insert(Name)) Archs.push_back(Name); } @@ -374,7 +375,7 @@ void Driver::BuildUniversalActions(const ArgList &Args, << types::getTypeName(Act->getType()); ActionList Inputs; - for (unsigned i = 0, e = Archs.size(); i != e; ++i ) + for (unsigned i = 0, e = Archs.size(); i != e; ++i) Inputs.push_back(new BindArchAction(Act, Archs[i])); // Lipo if necessary, We do it this way because we need to set the diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 5cba62619567..700059065403 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -354,8 +354,13 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA, for (ArgList::const_iterator it = Args.begin(), ie = Args.end(); it != ie; ++it) { Arg *A = *it; - if (A->getOption().hasForwardToGCC()) + if (A->getOption().hasForwardToGCC()) { + // It is unfortunate that we have to claim here, as this means + // we will basically never report anything interesting for + // platforms using a generic gcc. + A->claim(); A->render(Args, CmdArgs); + } } RenderExtraToolArgs(CmdArgs);