[PyTorch] Make c10::str(const char*) return const char* (#52222)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52222
`c10::str()` is often used with variadic macros. It can be more efficient to get a C string out if you put a C string in, like if you are able to defer std::string creation to an outlined function or even never do it at all. Meanwhile, there is an implicit conversion from const char* to std::string, so users who expected a std::string will still make one.
ghstack-source-id: 121877052
(Note: this ignores all push blocking failures!)
Test Plan: CI
Reviewed By: bhosmer
Differential Revision: D26419663
fbshipit-source-id: 400bef71e6a0004b5914f5f511ea0e04e0d7599b