Add the ability for a ClangASTType to be marked as 'packed' when constructed
llvm-svn: 220891
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 8347444..c795e4e 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -1857,7 +1857,8 @@
ClangASTType
ClangASTContext::GetOrCreateStructForIdentifier (const ConstString &type_name,
- const std::initializer_list< std::pair < const char *, ClangASTType > >& type_fields)
+ const std::initializer_list< std::pair < const char *, ClangASTType > >& type_fields,
+ bool packed)
{
ClangASTType type;
if ((type = GetTypeForIdentifier<clang::CXXRecordDecl>(type_name)).IsValid())
@@ -1866,6 +1867,8 @@
type.StartTagDeclarationDefinition();
for (const auto& field : type_fields)
type.AddFieldToRecordType(field.first, field.second, lldb::eAccessPublic, 0);
+ if (packed)
+ type.SetIsPacked();
type.CompleteTagDeclarationDefinition();
return type;
}