On Sun, Mar 06, 2011 at 11:31:02PM -0000, Joerg Sonnenberger wrote:
> Author: joerg
> Date: Sun Mar 6 17:31:01 2011
> New Revision: 127137
>
> URL: http://llvm.org/viewvc/llvm-project?rev=127137&view=rev
> Log:
> If called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
> input is specified, use stdin implicitly. Based on a patch from
> Roman Divacky.
This broke the --no-demangle handling. Attached is a revised patch on
top. This changes back to passing down C->getArgs() as before, just
using the original DerivedArgList type. OK?
Joerg
Index: include/clang/Driver/Driver.h
===================================================================
--- include/clang/Driver/Driver.h (revision 127138)
+++ include/clang/Driver/Driver.h (working copy)
@@ -224,7 +224,7 @@
/// \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 @@
/// \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
Index: lib/Driver/Driver.cpp
===================================================================
--- lib/Driver/Driver.cpp (revision 127139)
+++ lib/Driver/Driver.cpp (working copy)
@@ -308,10 +308,10 @@
// 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 @@
}
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::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 @@
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));
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits