forked from OSchip/llvm-project
Small cleanups for the new enum fixes:
- Fix Xcode project to have source files for SBTypeEnumMember.h/SBTypeEnumMember.cpp in the right place - Rename a member variable to inluce "_sp" suffix since it is a shared pointer - Cleanup initialization code for TypeEnumMemberImpl to not warn about out of order initialization llvm-svn: 210051
This commit is contained in:
parent
22b065c748
commit
4bd024d4e8
|
@ -792,7 +792,7 @@ class TypeEnumMemberImpl
|
|||
{
|
||||
public:
|
||||
TypeEnumMemberImpl () :
|
||||
m_integer_type(),
|
||||
m_integer_type_sp(),
|
||||
m_name("<invalid>"),
|
||||
m_value(),
|
||||
m_valid(false)
|
||||
|
@ -803,7 +803,7 @@ public:
|
|||
const lldb_private::ClangASTType& integer_type);
|
||||
|
||||
TypeEnumMemberImpl (const TypeEnumMemberImpl& rhs) :
|
||||
m_integer_type(rhs.m_integer_type),
|
||||
m_integer_type_sp(rhs.m_integer_type_sp),
|
||||
m_name(rhs.m_name),
|
||||
m_value(rhs.m_value),
|
||||
m_valid(rhs.m_valid)
|
||||
|
@ -828,7 +828,7 @@ public:
|
|||
const lldb::TypeImplSP &
|
||||
GetIntegerType () const
|
||||
{
|
||||
return m_integer_type;
|
||||
return m_integer_type_sp;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
@ -844,7 +844,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
lldb::TypeImplSP m_integer_type;
|
||||
lldb::TypeImplSP m_integer_type_sp;
|
||||
ConstString m_name;
|
||||
llvm::APSInt m_value;
|
||||
bool m_valid;
|
||||
|
|
|
@ -2091,8 +2091,6 @@
|
|||
08FB7794FE84155DC02AAC07 /* lldb */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */,
|
||||
23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */,
|
||||
26F5C32810F3DF7D009D5894 /* Libraries */,
|
||||
264E8576159BE51A00E9D7A2 /* Resources */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
|
@ -2522,6 +2520,8 @@
|
|||
261744771168585B005ADD65 /* SBType.cpp */,
|
||||
9475C18514E5E9C5001BFC6D /* SBTypeCategory.h */,
|
||||
9475C18714E5E9FA001BFC6D /* SBTypeCategory.cpp */,
|
||||
23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */,
|
||||
23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */,
|
||||
9461568614E355F2003A195C /* SBTypeFilter.h */,
|
||||
9461568A14E35621003A195C /* SBTypeFilter.cpp */,
|
||||
9461568714E355F2003A195C /* SBTypeFormat.h */,
|
||||
|
|
|
@ -1171,9 +1171,17 @@ TypeImpl::GetDescription (lldb_private::Stream &strm,
|
|||
|
||||
TypeEnumMemberImpl::TypeEnumMemberImpl (const clang::EnumConstantDecl* enum_member_decl,
|
||||
const lldb_private::ClangASTType& integer_type) :
|
||||
m_value(enum_member_decl->getInitVal()),
|
||||
m_integer_type(new TypeImpl(integer_type))
|
||||
m_integer_type_sp(),
|
||||
m_name(),
|
||||
m_value(),
|
||||
m_valid(false)
|
||||
|
||||
{
|
||||
m_name = ConstString(enum_member_decl->getNameAsString().c_str());
|
||||
m_valid = true;
|
||||
if (enum_member_decl)
|
||||
{
|
||||
m_integer_type_sp.reset(new TypeImpl(integer_type));
|
||||
m_name = ConstString(enum_member_decl->getNameAsString().c_str());
|
||||
m_value = enum_member_decl->getInitVal();
|
||||
m_valid = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue