https://github.com/jmorse commented:

This seems fine; note that while your change to use StringRef as a parameter 
type is cleaner, both call sites you change are passing `char *`'s and I 
believe this means we'll run `strlen` every time this function is called? 
Better to construct directly from the `std::string` being fed in, and add a 
case to break on a zero-byte to the switch IMO.

I'm cautious to give an immediate LGTM as I'm not a frequent clang contributor 
or familiar with the CIR work; someone elses approval would be appreciated.

https://github.com/llvm/llvm-project/pull/154905
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to