Replace multiple strlen calls with a StringRef constructor and a StringRef::size call.
Rename ArgSize to SpellingSize, and add ArgStringSize.
Details
Diff Detail
Event Timeline
Renamed ArgSize to SpellingSize, because both ArgSize and ArgStringSize would be confusing
I do not have commit access, can you commit this for me?
(Ilyas Mustafazade <il.mystafa@gmail.com>)
llvm/lib/Option/Option.cpp | ||
---|---|---|
208 | @hans do you know what this TODO is about, https://reviews.llvm.org/D1387 |
llvm/lib/Option/Option.cpp | ||
---|---|---|
208 | I just copied it from the other flag classes. The FIXMEs were added in https://github.com/llvm/llvm-project/commit/458b6982d471992337639382cdac1bb30311b4c0 I'm guessing the author figured the sizes should already be known (I think the ArgList is storing StringRefs maybe?) and the strlen shouldn't really be needed. I think that's a minor detail, but one day it would be nice to modernize the whole options framework and use less char pointers. |
@hans do you know what this TODO is about, https://reviews.llvm.org/D1387
If this is about performance, we still have strlen in StringRef