diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp index c2dadadfd30..253375289ad 100644 --- a/tools/llvm2cpp/CppWriter.cpp +++ b/tools/llvm2cpp/CppWriter.cpp @@ -515,7 +515,8 @@ CppWriter::printTypeInternal(const Type* Ty) { nl(Out); } Out << "StructType* " << typeName << " = StructType::get(" - << typeName << "_fields);"; + << typeName << "_fields, /*isPacked=*/" + << (ST->isPacked() ? "true" : "false") << ");"; nl(Out); break; }