Index: cfe/trunk/include/clang/Driver/Driver.h =================================================================== --- cfe/trunk/include/clang/Driver/Driver.h +++ cfe/trunk/include/clang/Driver/Driver.h @@ -299,12 +299,10 @@ /// given arguments, which are only done for a single architecture. /// /// \param C - The compilation that is being built. - /// \param TC - The default host tool chain. /// \param Args - The input arguments. /// \param Actions - The list to store the resulting actions onto. - void BuildActions(Compilation &C, const ToolChain &TC, - llvm::opt::DerivedArgList &Args, const InputList &Inputs, - ActionList &Actions) const; + void BuildActions(Compilation &C, llvm::opt::DerivedArgList &Args, + const InputList &Inputs, ActionList &Actions) const; /// BuildUniversalActions - Construct the list of actions to perform /// for the given arguments, which may require a universal build. @@ -376,9 +374,8 @@ /// ConstructAction - Construct the appropriate action to do for /// \p Phase on the \p Input, taking in to account arguments /// like -fsyntax-only or --analyze. - Action *ConstructPhaseAction(Compilation &C, const ToolChain &TC, - const llvm::opt::ArgList &Args, phases::ID Phase, - Action *Input) const; + Action *ConstructPhaseAction(Compilation &C, const llvm::opt::ArgList &Args, + phases::ID Phase, Action *Input) const; /// BuildJobsForAction - Construct the jobs to perform for the action \p A and /// return an InputInfo for the result of running \p A. Will only construct Index: cfe/trunk/lib/Driver/Driver.cpp =================================================================== --- cfe/trunk/lib/Driver/Driver.cpp +++ cfe/trunk/lib/Driver/Driver.cpp @@ -510,8 +510,7 @@ if (TC.getTriple().isOSBinFormatMachO()) BuildUniversalActions(*C, C->getDefaultToolChain(), Inputs); else - BuildActions(*C, C->getDefaultToolChain(), C->getArgs(), Inputs, - C->getActions()); + BuildActions(*C, C->getArgs(), Inputs, C->getActions()); if (CCCPrintPhases) { PrintActions(*C); @@ -625,7 +624,7 @@ if (TC.getTriple().isOSBinFormatMachO()) BuildUniversalActions(C, TC, Inputs); else - BuildActions(C, TC, C.getArgs(), Inputs, C.getActions()); + BuildActions(C, C.getArgs(), Inputs, C.getActions()); BuildJobs(C); @@ -1036,7 +1035,7 @@ Archs.push_back(Args.MakeArgString(TC.getDefaultUniversalArchName())); ActionList SingleActions; - BuildActions(C, TC, Args, BAInputs, SingleActions); + BuildActions(C, Args, BAInputs, SingleActions); // Add in arch bindings for every top level action, as well as lipo and // dsymutil steps if needed. @@ -1322,8 +1321,7 @@ assert(C.getCudaDeviceToolChain() && "Missing toolchain for device-side compilation."); ActionList CudaDeviceActions; - C.getDriver().BuildActions(C, *C.getCudaDeviceToolChain(), Args, - CudaDeviceInputs, CudaDeviceActions); + C.getDriver().BuildActions(C, Args, CudaDeviceInputs, CudaDeviceActions); assert(GpuArchList.size() == CudaDeviceActions.size() && "Failed to create actions for all devices"); @@ -1387,9 +1385,8 @@ ActionList({FatbinAction})); } -void Driver::BuildActions(Compilation &C, const ToolChain &TC, - DerivedArgList &Args, const InputList &Inputs, - ActionList &Actions) const { +void Driver::BuildActions(Compilation &C, DerivedArgList &Args, + const InputList &Inputs, ActionList &Actions) const { llvm::PrettyStackTraceString CrashInfo("Building compilation actions"); if (!SuppressMissingInputWarning && Inputs.empty()) { @@ -1516,7 +1513,7 @@ continue; // Otherwise construct the appropriate action. - Current = ConstructPhaseAction(C, TC, Args, Phase, Current); + Current = ConstructPhaseAction(C, Args, Phase, Current); if (InputType == types::TY_CUDA && Phase == CudaInjectionPhase) { Current = buildCudaActions(C, Args, InputArg, Current, Actions); @@ -1553,9 +1550,8 @@ Args.ClaimAllArgs(options::OPT_cuda_host_only); } -Action *Driver::ConstructPhaseAction(Compilation &C, const ToolChain &TC, - const ArgList &Args, phases::ID Phase, - Action *Input) const { +Action *Driver::ConstructPhaseAction(Compilation &C, const ArgList &Args, + phases::ID Phase, Action *Input) const { llvm::PrettyStackTraceString CrashInfo("Constructing phase actions"); // Build the appropriate action. switch (Phase) {