aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ArgList.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-06-09 22:31:00 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-06-09 22:31:00 +0000
commit4465a776a56de81211ae4672e5782c6bef075135 (patch)
tree8d13f1e726299f975fdd658cbe3b80d67e0eef7c /lib/Driver/ArgList.cpp
parentbfbb39deabba4f7b8c89d69a28653074c8936086 (diff)
Driver: Change Arg to just hold the values directly, instead of implicitly
deriving them from the Arg type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r--lib/Driver/ArgList.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp
index ad067f108e..9cf2eaf7c9 100644
--- a/lib/Driver/ArgList.cpp
+++ b/lib/Driver/ArgList.cpp
@@ -264,23 +264,26 @@ Arg *DerivedArgList::MakeFlagArg(const Arg *BaseArg, const Option *Opt) const {
Arg *DerivedArgList::MakePositionalArg(const Arg *BaseArg, const Option *Opt,
llvm::StringRef Value) const {
- Arg *A = new PositionalArg(Opt, BaseArgs.MakeIndex(Value), BaseArg);
+ unsigned Index = BaseArgs.MakeIndex(Value);
+ Arg *A = new PositionalArg(Opt, Index, BaseArgs.getArgString(Index), BaseArg);
SynthesizedArgs.push_back(A);
return A;
}
Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option *Opt,
llvm::StringRef Value) const {
- Arg *A = new SeparateArg(Opt, BaseArgs.MakeIndex(Opt->getName(), Value), 1,
- BaseArg);
+ unsigned Index = BaseArgs.MakeIndex(Opt->getName(), Value);
+ Arg *A = new SeparateArg(Opt, Index, BaseArgs.getArgString(Index), BaseArg);
SynthesizedArgs.push_back(A);
return A;
}
Arg *DerivedArgList::MakeJoinedArg(const Arg *BaseArg, const Option *Opt,
llvm::StringRef Value) const {
- Arg *A = new JoinedArg(Opt, BaseArgs.MakeIndex(Opt->getName() + Value.str()),
- strlen(Opt->getName()), BaseArg);
+ unsigned Index = BaseArgs.MakeIndex(Opt->getName() + Value.str());
+ Arg *A = new JoinedArg(Opt, Index,
+ BaseArgs.getArgString(Index) + strlen(Opt->getName()),
+ BaseArg);
SynthesizedArgs.push_back(A);
return A;
}