[Lldb-commits] [lldb] r146418 - /lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Greg Clayton
gclayton at apple.com
Mon Dec 12 13:50:19 PST 2011
Author: gclayton
Date: Mon Dec 12 15:50:19 2011
New Revision: 146418
URL: http://llvm.org/viewvc/llvm-project?rev=146418&view=rev
Log:
Use forward types where possible to avoid having to parse extra DWARF when
it is not required.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=146418&r1=146417&r2=146418&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Dec 12 15:50:19 2011
@@ -1444,10 +1444,10 @@
member_accessibilities.push_back(accessibility);
field_decl = GetClangASTContext().AddFieldToRecordType (class_clang_type,
- name,
- member_type->GetClangLayoutType(),
- accessibility,
- bit_size);
+ name,
+ member_type->GetClangLayoutType(),
+ accessibility,
+ bit_size);
}
else
{
@@ -3341,7 +3341,9 @@
{
function_param_types.push_back (type->GetClangForwardType());
- clang::ParmVarDecl *param_var_decl = GetClangASTContext().CreateParameterDeclaration (name, type->GetClangForwardType(), storage);
+ clang::ParmVarDecl *param_var_decl = GetClangASTContext().CreateParameterDeclaration (name,
+ type->GetClangForwardType(),
+ storage);
assert(param_var_decl);
function_param_decls.push_back(param_var_decl);
}
@@ -4793,7 +4795,7 @@
func_type = ResolveTypeUID(type_die_offset);
if (func_type)
- return_clang_type = func_type->GetClangLayoutType();
+ return_clang_type = func_type->GetClangForwardType();
else
return_clang_type = ast.GetBuiltInType_void();
@@ -5116,7 +5118,7 @@
element_orders.push_back (1);
if (byte_stride == 0 && bit_stride == 0)
byte_stride = element_type->GetByteSize();
- clang_type_t array_element_type = element_type->GetClangFullType();
+ clang_type_t array_element_type = element_type->GetClangForwardType();
uint64_t array_element_bit_stride = byte_stride * 8 + bit_stride;
uint64_t num_elements = 0;
std::vector<uint64_t>::const_reverse_iterator pos;
@@ -6002,7 +6004,7 @@
Type *matching_type = ResolveType (dwarf_cu, die);
- lldb::clang_type_t type = matching_type->GetClangFullType();
+ lldb::clang_type_t type = matching_type->GetClangForwardType();
clang::QualType qual_type = clang::QualType::getFromOpaquePtr(type);
if (const clang::TagType *tag_type = llvm::dyn_cast<clang::TagType>(qual_type.getTypePtr()))
More information about the lldb-commits
mailing list