diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2011-03-07 01:15:29 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2011-03-07 01:15:29 +0000 |
commit | 65f7165676854bf75494f5b73a620d7237db5d41 (patch) | |
tree | 2456428b94eec701bbc5c82f18d47088dc53b6e8 | |
parent | e6ec11aa15c7104d57009c6e036bf4ae29c35fb2 (diff) | |
download | clang-65f7165676854bf75494f5b73a620d7237db5d41.tar.gz |
Redo part of r127137:
Pass down the correct C->getArgs, but keep it with the original
DerivedArgList type. Slightly adjust the MakeIndex call for the
different base type. This unbreaks the handling of --no-mangle on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127142 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/Driver.h | 4 | ||||
-rw-r--r-- | lib/Driver/Driver.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index dd91ea77ba..2ab69c236f 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -224,7 +224,7 @@ public: /// \param TC - The default host tool chain. /// \param Args - The input arguments. /// \param Actions - The list to store the resulting actions onto. - void BuildActions(const ToolChain &TC, const InputArgList &Args, + void BuildActions(const ToolChain &TC, const DerivedArgList &Args, ActionList &Actions) const; /// BuildUniversalActions - Construct the list of actions to perform @@ -233,7 +233,7 @@ public: /// \param TC - The default host tool chain. /// \param Args - The input arguments. /// \param Actions - The list to store the resulting actions onto. - void BuildUniversalActions(const ToolChain &TC, const InputArgList &Args, + void BuildUniversalActions(const ToolChain &TC, const DerivedArgList &Args, ActionList &Actions) const; /// BuildJobs - Bind actions to concrete tools and translate diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 5908659ff1..572323a963 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -308,10 +308,10 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) { // Construct the list of abstract actions to perform for this compilation. if (Host->useDriverDriver()) - BuildUniversalActions(C->getDefaultToolChain(), C->getInputArgs(), + BuildUniversalActions(C->getDefaultToolChain(), C->getArgs(), C->getActions()); else - BuildActions(C->getDefaultToolChain(), C->getInputArgs(), C->getActions()); + BuildActions(C->getDefaultToolChain(), C->getArgs(), C->getActions()); if (CCCPrintActions) { PrintActions(*C); @@ -593,7 +593,7 @@ static bool ContainsCompileAction(const Action *A) { } void Driver::BuildUniversalActions(const ToolChain &TC, - const InputArgList &Args, + const DerivedArgList &Args, ActionList &Actions) const { llvm::PrettyStackTraceString CrashInfo("Building universal build actions"); // Collect the list of architectures. Duplicates are allowed, but should only @@ -688,7 +688,7 @@ void Driver::BuildUniversalActions(const ToolChain &TC, } } -void Driver::BuildActions(const ToolChain &TC, const InputArgList &Args, +void Driver::BuildActions(const ToolChain &TC, const DerivedArgList &Args, ActionList &Actions) const { llvm::PrettyStackTraceString CrashInfo("Building compilation actions"); // Start by constructing the list of inputs and their types. @@ -802,7 +802,7 @@ void Driver::BuildActions(const ToolChain &TC, const InputArgList &Args, if (CCCIsCPP && Inputs.empty()) { // If called as standalone preprocessor, stdin is processed // if no other input is present. - unsigned Index = Args.MakeIndex("-"); + unsigned Index = Args.getBaseArgs().MakeIndex("-"); Arg *A = Opts->ParseOneArg(Args, Index); A->claim(); Inputs.push_back(std::make_pair(types::TY_C, A)); |