summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/SymbolVendor.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-11-13 03:52:47 +0000
committerGreg Clayton <gclayton@apple.com>2010-11-13 03:52:47 +0000
commit526e5afb2d616f483d44aa393473e93d962af6a0 (patch)
tree556d76a66a0884e230910c37925ce20fe8b04aff /lldb/source/Symbol/SymbolVendor.cpp
parentf01b622902269c7fc01fbd9b26393eabdfb82076 (diff)
downloadbcm5719-llvm-526e5afb2d616f483d44aa393473e93d962af6a0.tar.gz
bcm5719-llvm-526e5afb2d616f483d44aa393473e93d962af6a0.zip
Modified the lldb_private::Type clang type resolving code to handle three
cases when getting the clang type: - need only a forward declaration - need a clang type that can be used for layout (members and args/return types) - need a full clang type This allows us to partially parse the clang types and be as lazy as possible. The first case is when we just need to declare a type and we will complete it later. The forward declaration happens only for class/union/structs and enums. The layout type allows us to resolve the full clang type _except_ if we have any modifiers on a pointer or reference (both R and L value). In this case when we are adding members or function args or return types, we only need to know how the type will be laid out and we can defer completing the pointee type until we later need it. The last type means we need a full definition for the clang type. Did some renaming of some enumerations to get rid of the old "DC" prefix (which stands for DebugCore which is no longer around). Modified the clang namespace support to be almost ready to be fed to the expression parser. I made a new ClangNamespaceDecl class that can carry around the AST and the namespace decl so we can copy it into the expression AST. I modified the symbol vendor and symbol file plug-ins to use this new class. llvm-svn: 118976
Diffstat (limited to 'lldb/source/Symbol/SymbolVendor.cpp')
-rw-r--r--lldb/source/Symbol/SymbolVendor.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp
index d960dde30e6..f2a3681f535 100644
--- a/lldb/source/Symbol/SymbolVendor.cpp
+++ b/lldb/source/Symbol/SymbolVendor.cpp
@@ -261,22 +261,16 @@ SymbolVendor::FindTypes (const SymbolContext& sc, const ConstString &name, bool
types.Clear();
return 0;
}
-//
-//uint32_t
-//SymbolVendor::FindTypes(const SymbolContext& sc, const RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding encoding, const char *udt_name, TypeList& types)
-//{
-// Mutex::Locker locker(m_mutex);
-// if (m_sym_file_ap.get())
-// {
-// lldb::user_id_t udt_uid = LLDB_INVALID_UID;
-//
-// if (encoding == Type::user_defined_type)
-// udt_uid = UserDefType::GetUserDefTypeUID(udt_name);
-//
-// return m_sym_file_ap->FindTypes(sc, regex, append, max_matches, encoding, udt_uid, types);
-// }
-// return 0;
-//}
+
+ClangNamespaceDecl
+SymbolVendor::FindNamespace(const SymbolContext& sc, const ConstString &name)
+{
+ Mutex::Locker locker(m_mutex);
+ ClangNamespaceDecl namespace_decl;
+ if (m_sym_file_ap.get())
+ namespace_decl = m_sym_file_ap->FindNamespace (sc, name);
+ return namespace_decl;
+}
void
SymbolVendor::Dump(Stream *s)
OpenPOWER on IntegriCloud