[LLVMdev] Correct use of StringRef and Twine

FlyLanguage flylanguage at gmail.com
Tue Jul 19 11:50:47 PDT 2011

Den 19.07.2011 20:14, skrev David Blaikie:
>>> Perhaps, I suppose, I'm not sure just how portable llvm code is.
>> Very portable AFAICT. I'm even going to port it to my hobbyist OS once C++
>> rtti is totally gone in the llvm code base.
> Sorry, I meant source portable to different compilers (ie: which
> compilers does llvm compile on&  how many have really poor std::string
> implementations).

I should elaborate... the problem with STL, and std::string in 
particular, is that you have to consider each implementation's 
performance characteristics. For stuff like LLVM, where performance is 
really critical, you have to code against a particular implementation.

Some string implementations does simple COW/refcounting, others do SSO, 
some do LSP, some do other optimizations. And there are all sorts of 
combinations, and future implementations are likely to change on certain 

It's nasty.

More information about the llvm-dev mailing list