Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.
llvm-svn: 67291
diff --git a/clang/lib/Driver/Arg.cpp b/clang/lib/Driver/Arg.cpp
index fa8e233..eba39dd 100644
--- a/clang/lib/Driver/Arg.cpp
+++ b/clang/lib/Driver/Arg.cpp
@@ -50,6 +50,16 @@
llvm::errs() << ">\n";
}
+void Arg::renderAsInput(const ArgList &Args, ArgStringList &Output) const {
+ if (!getOption().hasNoOptAsInput()) {
+ render(Args, Output);
+ return;
+ }
+
+ for (unsigned i = 0, e = getNumValues(); i != e; ++i)
+ Output.push_back(getValue(Args, i));
+}
+
FlagArg::FlagArg(const Option *Opt, unsigned Index)
: Arg(FlagClass, Opt, Index) {
}