Twine: Make isNull() public. (#1162)

This makes it possible to pass "null" Twines and detect it in the callee.
This commit is contained in:
Peter Johnson
2018-06-23 16:13:50 -07:00
committed by GitHub
parent 212f378d08
commit ea7d11b1db

View File

@@ -179,11 +179,6 @@ namespace wpi {
assert(isValid() && "Invalid twine!");
}
/// Check for the null twine.
bool isNull() const {
return getLHSKind() == NullKind;
}
/// Check for the empty twine.
bool isEmpty() const {
return getLHSKind() == EmptyKind;
@@ -380,6 +375,11 @@ namespace wpi {
/// @name Predicate Operations
/// @{
/// Check for the null twine.
bool isNull() const {
return getLHSKind() == NullKind;
}
/// Check if this twine is trivially empty; a false return value does not
/// necessarily mean the twine is empty.
bool isTriviallyEmpty() const {