[cfe-dev] StringRef'ize APIs
jediknil at belkadan.com
Fri Jul 1 11:44:22 PDT 2011
I'd suggest looking for places that use std::string. C++ strings are about as expensive as StringRefs to build from a char*, and (IIRC) aren't stack-based if you mutate them (unlike llvm::SmallString).
In addition, methods that have std::string or const char * /arguments/ are probably more interesting than those that have std::string or const char * /return values/. A return value is just delaying a conversion until later, but an argument could be forcing a conversion that isn't necessary. (Of course, if a string is in StringRef form and then is returned as a std::string, that's just as bad.)
It's definitely cool that you're doing this, but if you get bored, you can always look for low-hanging fruit in Bugzilla (http://llvm.org/bugs) to give yourself an excuse to learn about a specific part of Clang. (That's how I got started. *grin*)
On Jul 1, 2011, at 11:26, Zach Wheeler wrote:
> Can anyone suggest some APIs in Clang that particularly need StringRef'izing?
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev