This revision was automatically updated to reflect the committed changes. Closed by commit rL295445: Fix compiler warnings for missing switch cases in lldb. (authored by labath).
Changed prior to commit: https://reviews.llvm.org/D30005?vs=88604&id=88876#toc Repository: rL LLVM https://reviews.llvm.org/D30005 Files: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp lldb/trunk/source/Symbol/ClangASTContext.cpp lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp
Index: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp =================================================================== --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1907,6 +1907,7 @@ llvm::Triple triple(llvm::Twine("-") + vendor_name + "-" + os_name); assert(triple.getObjectFormat() != llvm::Triple::UnknownObjectFormat); + assert(triple.getObjectFormat() != llvm::Triple::Wasm); switch (triple.getObjectFormat()) { case llvm::Triple::MachO: m_process_arch.SetArchitecture(eArchTypeMachO, cpu, sub); @@ -1917,6 +1918,10 @@ case llvm::Triple::COFF: m_process_arch.SetArchitecture(eArchTypeCOFF, cpu, sub); break; + case llvm::Triple::Wasm: + if (log) + log->Printf("error: not supported target architecture"); + return false; case llvm::Triple::UnknownObjectFormat: if (log) log->Printf("error: failed to determine target architecture"); Index: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp =================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -139,6 +139,7 @@ case DeclarationName::CXXConstructorName: case DeclarationName::CXXDestructorName: case DeclarationName::CXXConversionFunctionName: + case DeclarationName::CXXDeductionGuideName: SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); return false; } Index: lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp +++ lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp @@ -61,93 +61,6 @@ } std::string decl_name(clang_decl_name.getAsString()); - - switch (clang_decl_name.getNameKind()) { - // Normal identifiers. - case clang::DeclarationName::Identifier: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"Identifier\", name = \"%s\")\n", decl_ctx, - // decl_name.c_str()); - if (clang_decl_name.getAsIdentifierInfo()->getBuiltinID() != 0) { - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - } - break; - - case clang::DeclarationName::ObjCZeroArgSelector: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"ObjCZeroArgSelector\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::ObjCOneArgSelector: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"ObjCOneArgSelector\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::ObjCMultiArgSelector: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"ObjCMultiArgSelector\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::CXXConstructorName: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"CXXConstructorName\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::CXXDestructorName: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"CXXDestructorName\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::CXXConversionFunctionName: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"CXXConversionFunctionName\", name = - // \"%s\")\n", decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::CXXOperatorName: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"CXXOperatorName\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::CXXLiteralOperatorName: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"CXXLiteralOperatorName\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - - case clang::DeclarationName::CXXUsingDirective: - // printf - // ("ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(decl_ctx - // = %p, decl_name = { kind = \"CXXUsingDirective\", name = \"%s\")\n", - // decl_ctx, decl_name.c_str()); - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - } - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); return false; } Index: lldb/trunk/source/Symbol/ClangASTContext.cpp =================================================================== --- lldb/trunk/source/Symbol/ClangASTContext.cpp +++ lldb/trunk/source/Symbol/ClangASTContext.cpp @@ -4316,6 +4316,8 @@ break; case clang::Type::TemplateSpecialization: break; + case clang::Type::DeducedTemplateSpecialization: + break; case clang::Type::Atomic: break; case clang::Type::Pipe: @@ -5124,6 +5126,7 @@ case clang::Type::TypeOf: case clang::Type::Decltype: case clang::Type::TemplateSpecialization: + case clang::Type::DeducedTemplateSpecialization: case clang::Type::Atomic: case clang::Type::Adjusted: case clang::Type::Pipe: @@ -5273,6 +5276,7 @@ case clang::Type::TypeOf: case clang::Type::Decltype: case clang::Type::TemplateSpecialization: + case clang::Type::DeducedTemplateSpecialization: case clang::Type::Atomic: case clang::Type::Adjusted: case clang::Type::Pipe:
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits