diff options
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 91f427fa2c..b0c76c8e8e 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -466,7 +466,10 @@ std::ostream &CWriter::printType(std::ostream &Out, const Type *Ty, printType(Out, *I, false, "field" + utostr(Idx++)); Out << ";\n"; } - return Out << '}'; + Out << '}'; + if (STy->isPacked()) + Out << " __attribute__ ((packed))"; + return Out; } case Type::PointerTyID: { |