[ADT] Add llvm::StringLiteral.
authorZachary Turner <zturner@google.com>
Tue, 13 Dec 2016 17:03:49 +0000 (17:03 +0000)
committerZachary Turner <zturner@google.com>
Tue, 13 Dec 2016 17:03:49 +0000 (17:03 +0000)
commitbc48d20ef77713852f4f0543956c116e8098e44d
tree05f2af03c95ba8b0ef3fe8c14a48aeed424e89fc
parent09d5daab49a016b6eb6271e9f4b144774b59540e
[ADT] Add llvm::StringLiteral.

StringLiteral is a wrapper around a string literal useful for
replacing global tables of char arrays with global tables of
StringRefs that can initialized in a constexpr context, avoiding
the invocation of a global constructor.

Differential Revision: https://reviews.llvm.org/D27686

llvm-svn: 289551
llvm/include/llvm/ADT/StringRef.h
llvm/unittests/ADT/StringRefTest.cpp