summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-25 04:13:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-25 04:13:45 +0000
commitdac54a81df89223b6887408d9427501603d8648d (patch)
tree9bc9a6b8b42475cc1d67aa5cb9ccd4d6587abb45 /clang/lib/Driver/Driver.cpp
parent68b0881d94f3b46d173038865b9fc02eb9b5f5d7 (diff)
downloadbcm5719-llvm-dac54a81df89223b6887408d9427501603d8648d.tar.gz
bcm5719-llvm-dac54a81df89223b6887408d9427501603d8648d.zip
Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList. - This is not a great decomposition, but it does embed the translation into the type system, and keep things efficient for tool chains that don't want to do any translation. - No intended functionality change. Eventually I hope to get rid of tool chain specific translation and have each tool do the right thing, but for now this is the easiest way to match gcc precisely (which is good for testing). llvm-svn: 67676
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 2ffd6419101..85d76c8c20f 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -56,9 +56,10 @@ Driver::~Driver() {
delete Host;
}
-ArgList *Driver::ParseArgStrings(const char **ArgBegin, const char **ArgEnd) {
+InputArgList *Driver::ParseArgStrings(const char **ArgBegin,
+ const char **ArgEnd) {
llvm::PrettyStackTraceString CrashInfo("Command line argument parsing");
- ArgList *Args = new ArgList(ArgBegin, ArgEnd);
+ InputArgList *Args = new InputArgList(ArgBegin, ArgEnd);
// FIXME: Handle '@' args (or at least error on them).
@@ -171,7 +172,7 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
}
}
- ArgList *Args = ParseArgStrings(Start, End);
+ InputArgList *Args = ParseArgStrings(Start, End);
Host = GetHostInfo(HostTriple);
@@ -851,8 +852,8 @@ void Driver::BuildJobsForAction(Compilation &C,
}
llvm::errs() << "], output: " << Result.getAsString() << "\n";
} else {
- const ArgList &TCArgs = C.getArgsForToolChain(TC);
- T.ConstructJob(C, *JA, *Dest, Result, InputInfos, TCArgs, LinkingOutput);
+ T.ConstructJob(C, *JA, *Dest, Result, InputInfos,
+ C.getArgsForToolChain(TC), LinkingOutput);
}
}
OpenPOWER on IntegriCloud