mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Add a bool->StringRef c'tor to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
36e6ae6106
commit
fb5b3eaacb
1 file changed
+4
@@ -90,6 +90,10 @@ namespace llvm {
|
||||
/*implicit*/ StringRef(const std::string &Str)
|
||||
: Data(Str.data()), Length(Str.length()) {}
|
||||
|
||||
/// Construct a string ref from a boolean.
|
||||
explicit StringRef(bool B)
|
||||
: Data(B ? "true" : "false"), Length(::strlen(Data)) {}
|
||||
|
||||
/// @}
|
||||
/// @name Iterators
|
||||
/// @{
|
||||
|
||||
Reference in new issue
Block a user