Author: friss Date: Wed Aug 29 17:37:23 2018 New Revision: 341006 URL: http://llvm.org/viewvc/llvm-project?rev=341006&view=rev Log: Provide a default implementation of TypeSystem::GetNumTemplateArguments
... and remove the dummy implementations from the languages that do not support it. Modified: lldb/trunk/include/lldb/Symbol/GoASTContext.h lldb/trunk/include/lldb/Symbol/JavaASTContext.h lldb/trunk/include/lldb/Symbol/OCamlASTContext.h lldb/trunk/include/lldb/Symbol/TypeSystem.h lldb/trunk/source/Symbol/JavaASTContext.cpp lldb/trunk/source/Symbol/TypeSystem.cpp Modified: lldb/trunk/include/lldb/Symbol/GoASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/GoASTContext.h?rev=341006&r1=341005&r2=341006&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/GoASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/GoASTContext.h Wed Aug 29 17:37:23 2018 @@ -310,10 +310,6 @@ public: const char *name, bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) override; - size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override { - return 0; - } - //---------------------------------------------------------------------- // Dumping types //---------------------------------------------------------------------- Modified: lldb/trunk/include/lldb/Symbol/JavaASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/JavaASTContext.h?rev=341006&r1=341005&r2=341006&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/JavaASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/JavaASTContext.h Wed Aug 29 17:37:23 2018 @@ -201,8 +201,6 @@ public: unsigned GetTypeQualifiers(lldb::opaque_compiler_type_t type) override; - size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override; - int GetFunctionArgumentCount(lldb::opaque_compiler_type_t type) override; CompilerType GetFunctionArgumentTypeAtIndex(lldb::opaque_compiler_type_t type, Modified: lldb/trunk/include/lldb/Symbol/OCamlASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/OCamlASTContext.h?rev=341006&r1=341005&r2=341006&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/OCamlASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/OCamlASTContext.h Wed Aug 29 17:37:23 2018 @@ -227,10 +227,6 @@ public: const char *name, bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) override; - size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) override { - return 0; - } - void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s, lldb::Format format, const DataExtractor &data, lldb::offset_t data_offset, size_t data_byte_size, Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=341006&r1=341005&r2=341006&view=diff ============================================================================== --- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original) +++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Wed Aug 29 17:37:23 2018 @@ -347,7 +347,7 @@ public: const char *name, bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) = 0; - virtual size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type) = 0; + virtual size_t GetNumTemplateArguments(lldb::opaque_compiler_type_t type); virtual lldb::TemplateArgumentKind GetTemplateArgumentKind(lldb::opaque_compiler_type_t type, size_t idx); Modified: lldb/trunk/source/Symbol/JavaASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/JavaASTContext.cpp?rev=341006&r1=341005&r2=341006&view=diff ============================================================================== --- lldb/trunk/source/Symbol/JavaASTContext.cpp (original) +++ lldb/trunk/source/Symbol/JavaASTContext.cpp Wed Aug 29 17:37:23 2018 @@ -878,11 +878,6 @@ JavaASTContext::ConvertStringToFloatValu return 0; } -size_t -JavaASTContext::GetNumTemplateArguments(lldb::opaque_compiler_type_t type) { - return 0; -} - uint32_t JavaASTContext::GetNumFields(lldb::opaque_compiler_type_t type) { if (JavaObjectType *obj = llvm::dyn_cast<JavaObjectType>(static_cast<JavaType *>(type))) { Modified: lldb/trunk/source/Symbol/TypeSystem.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/TypeSystem.cpp?rev=341006&r1=341005&r2=341006&view=diff ============================================================================== --- lldb/trunk/source/Symbol/TypeSystem.cpp (original) +++ lldb/trunk/source/Symbol/TypeSystem.cpp Wed Aug 29 17:37:23 2018 @@ -101,6 +101,10 @@ CompilerType TypeSystem::GetTypeForForma return CompilerType(this, type); } +size_t TypeSystem::GetNumTemplateArguments(lldb::opaque_compiler_type_t type) { + return 0; +} + TemplateArgumentKind TypeSystem::GetTemplateArgumentKind(opaque_compiler_type_t type, size_t idx) { return eTemplateArgumentKindNull; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits