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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 2ffd641..85d76c8 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -56,9 +56,10 @@
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 @@
}
}
- ArgList *Args = ParseArgStrings(Start, End);
+ InputArgList *Args = ParseArgStrings(Start, End);
Host = GetHostInfo(HostTriple);
@@ -851,8 +852,8 @@
}
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);
}
}