Michael137 created this revision.
Michael137 added reviewers: jingham, aprantl.
Herald added a project: All.
Michael137 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This member variable was removed a while ago in
443427357f539f5ac97e664a53aa9e50788abce9. It was previously used in
materialization code paths that have since been removed. Nowadays,
`m_object_pointer_type` gets set but not used anywhere.
This patch simply removes all remaining instances of it and any
supporting code.
**Testing**
- API tests pass
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129367
Files:
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -353,7 +353,7 @@
/// The following values contain layout information for the materialized
/// struct, but are not specific to a single materialization
struct StructVars {
- StructVars() : m_result_name(), m_object_pointer_type(nullptr, nullptr) {}
+ StructVars() : m_result_name() {}
lldb::offset_t m_struct_alignment =
0; ///< The alignment of the struct in bytes.
@@ -364,8 +364,6 @@
/// added since).
ConstString
m_result_name; ///< The name of the result variable ($1, for example)
- TypeFromUser m_object_pointer_type; ///< The type of the "this" variable, if
- ///one exists
};
std::unique_ptr<StructVars> m_struct_vars;
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@ -772,10 +772,6 @@
return;
AddContextClassType(context, TypeFromUser(m_ctx_obj->GetCompilerType()));
-
- m_struct_vars->m_object_pointer_type =
- TypeFromUser(ctx_obj_ptr->GetCompilerType());
-
return;
}
@@ -810,18 +806,6 @@
class_qual_type.getAsString());
AddContextClassType(context, class_user_type);
-
- if (method_decl->isInstance()) {
- // self is a pointer to the object
-
- QualType class_pointer_type =
- method_decl->getASTContext().getPointerType(class_qual_type);
-
- TypeFromUser self_user_type(class_pointer_type.getAsOpaquePtr(),
- function_decl_ctx.GetTypeSystem());
-
- m_struct_vars->m_object_pointer_type = self_user_type;
- }
return;
}
@@ -852,8 +836,6 @@
ClangUtil::GetQualType(pointee_type).getAsString());
AddContextClassType(context, pointee_type);
- TypeFromUser this_user_type(this_type->GetFullCompilerType());
- m_struct_vars->m_object_pointer_type = this_user_type;
}
}
@@ -869,10 +851,6 @@
return;
AddOneType(context, TypeFromUser(m_ctx_obj->GetCompilerType()));
-
- m_struct_vars->m_object_pointer_type =
- TypeFromUser(ctx_obj_ptr->GetCompilerType());
-
return;
}
@@ -917,28 +895,6 @@
ClangUtil::ToString(interface_type));
AddOneType(context, class_user_type);
-
- if (method_decl->isInstanceMethod()) {
- // self is a pointer to the object
-
- QualType class_pointer_type =
- method_decl->getASTContext().getObjCObjectPointerType(
- QualType(interface_type, 0));
-
- TypeFromUser self_user_type(class_pointer_type.getAsOpaquePtr(),
- function_decl_ctx.GetTypeSystem());
-
- m_struct_vars->m_object_pointer_type = self_user_type;
- } else {
- // self is a Class pointer
- QualType class_type = method_decl->getASTContext().getObjCClassType();
-
- TypeFromUser self_user_type(class_type.getAsOpaquePtr(),
- function_decl_ctx.GetTypeSystem());
-
- m_struct_vars->m_object_pointer_type = self_user_type;
- }
-
return;
}
// This branch will get hit if we are executing code in the context of
@@ -981,10 +937,6 @@
TypeFromUser class_user_type(self_clang_type);
AddOneType(context, class_user_type);
-
- TypeFromUser self_user_type(self_type->GetFullCompilerType());
-
- m_struct_vars->m_object_pointer_type = self_user_type;
}
void ClangExpressionDeclMap::LookupLocalVarNamespace(
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits