aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ArgList.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-05 16:56:25 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-05 16:56:25 +0000
commitbcf6a8025aa50f3f28cfbd0470cf3e8f5cffbab2 (patch)
tree96b4c5523b5aee0ca2cf01939e68e0cbdb811704 /lib/Driver/ArgList.cpp
parent3fd1ba0fa133d1c6e641770d0bc56606587d3eef (diff)
StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ArgList.cpp')
-rw-r--r--lib/Driver/ArgList.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp
index 596e2a7529..b8af9cc47e 100644
--- a/lib/Driver/ArgList.cpp
+++ b/lib/Driver/ArgList.cpp
@@ -287,9 +287,9 @@ Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option *Opt,
Arg *DerivedArgList::MakeJoinedArg(const Arg *BaseArg, const Option *Opt,
llvm::StringRef Value) const {
- unsigned Index = BaseArgs.MakeIndex(Opt->getName() + Value.str());
+ unsigned Index = BaseArgs.MakeIndex(Opt->getName().str() + Value.str());
Arg *A = new Arg(Opt, Index,
- BaseArgs.getArgString(Index) + strlen(Opt->getName()),
+ BaseArgs.getArgString(Index) + Opt->getName().size(),
BaseArg);
SynthesizedArgs.push_back(A);
return A;