[Lldb-commits] [lldb] r295445 - Fix compiler warnings for missing switch cases in lldb.
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 17 05:39:50 PST 2017
Author: labath
Date: Fri Feb 17 07:39:50 2017
New Revision: 295445
URL: http://llvm.org/viewvc/llvm-project?rev=295445&view=rev
Log:
Fix compiler warnings for missing switch cases in lldb.
Summary:
There have been a few new values added to a few LLVM enums
this change makes sure that LLDB code handles them correctly.
Reviewers: labath
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D30005
Author: Eugene Zemtsov <ezemtsov at google.com>
Modified:
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
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=295445&r1=295444&r2=295445&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Fri Feb 17 07:39:50 2017
@@ -139,6 +139,7 @@ bool ClangASTSource::FindExternalVisible
case DeclarationName::CXXConstructorName:
case DeclarationName::CXXDestructorName:
case DeclarationName::CXXConversionFunctionName:
+ case DeclarationName::CXXDeductionGuideName:
SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
return false;
}
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=295445&r1=295444&r2=295445&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Fri Feb 17 07:39:50 2017
@@ -1907,6 +1907,7 @@ bool GDBRemoteCommunicationClient::GetCu
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 @@ bool GDBRemoteCommunicationClient::GetCu
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");
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=295445&r1=295444&r2=295445&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Feb 17 07:39:50 2017
@@ -4316,6 +4316,8 @@ ClangASTContext::GetTypeClass(lldb::opaq
break;
case clang::Type::TemplateSpecialization:
break;
+ case clang::Type::DeducedTemplateSpecialization:
+ break;
case clang::Type::Atomic:
break;
case clang::Type::Pipe:
@@ -5124,6 +5126,7 @@ lldb::Encoding ClangASTContext::GetEncod
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 @@ lldb::Format ClangASTContext::GetFormat(
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:
Modified: lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp?rev=295445&r1=295444&r2=295445&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp (original)
+++ lldb/trunk/source/Symbol/ClangExternalASTSourceCallbacks.cpp Fri Feb 17 07:39:50 2017
@@ -61,93 +61,6 @@ bool ClangExternalASTSourceCallbacks::Fi
}
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;
}
More information about the lldb-commits
mailing list