From 0e227785cb2514e397f1b9b45c688e2d9c092a3e Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 19 Mar 2009 07:22:40 +0000 Subject: 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 --- clang/lib/Driver/Arg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clang/lib/Driver/Arg.cpp') diff --git a/clang/lib/Driver/Arg.cpp b/clang/lib/Driver/Arg.cpp index fa8e233fcdd..eba39dd4f48 100644 --- a/clang/lib/Driver/Arg.cpp +++ b/clang/lib/Driver/Arg.cpp @@ -50,6 +50,16 @@ void Arg::dump() const { 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) { } -- cgit v1.2.3