search for: llvm_constexpr

Displaying 2 results from an estimated 2 matches for "llvm_constexpr".

2016 Sep 25
3
Is it time to allow StringRef to be constructed from nullptr?
...licit, and provide an implicit one for string literal. I wonder if we could change that call site to be deleted (or at least explicit), and add support for literal strings with a StringRef version of this: /// Construct an ArrayRef from a C array. template <size_t N> /*implicit*/ LLVM_CONSTEXPR ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {} This way we’ll avoid the strlen on quoted strings which is the common case anyway, and then can see how many other cases we have from const char* remaining. Pete > > To come back to your point, I’m not sure if we should leave...
2016 Sep 25
8
Is it time to allow StringRef to be constructed from nullptr?
While porting LLDB over to StringRef, I am continuously running into difficulties caused by the fact that StringRef cannot be constructed from nullptr. So I wanted to see peoples' thoughts on removing this restriction from StringRef. To be clear, I'm only using LLDB as a motivating example, but I'm not requesting that it be done because LLDB is some kind of special case. If it is to