[lldb] Use Any::has_value instead of ANy::hasValue (NFC)

This commit is contained in:
Kazu Hirata 2022-08-20 07:28:06 -07:00
parent e15359debf
commit 347c462e97
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ private:
/// trait to deduce \a ParserT from a given InfoProvider, but unfortunately we
/// can't access CPlusPlusLanguage::MethodName from within the header.
template <class ParserT> static ParserT *get(llvm::Any parser) {
assert(parser.hasValue());
assert(parser.has_value());
assert(llvm::any_isa<ParserT *>(parser));
return llvm::any_cast<ParserT *>(parser);
}

View File

@ -24,7 +24,7 @@ RichManglingContext::~RichManglingContext() {
void RichManglingContext::ResetCxxMethodParser() {
// If we want to support parsers for other languages some day, we need a
// switch here to delete the correct parser type.
if (m_cxx_method_parser.hasValue()) {
if (m_cxx_method_parser.has_value()) {
assert(m_provider == PluginCxxLanguage);
delete get<CPlusPlusLanguage::MethodName>(m_cxx_method_parser);
m_cxx_method_parser.reset();