commit | 3d70855dd2d6f6f7d78c336fa27cf298db65bb82 | [log] [tgz] |
---|---|---|
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | Wed Jul 11 19:56:53 2007 +0000 |
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | Wed Jul 11 19:56:53 2007 +0000 |
tree | 8cebe2faebd639ea31a8ee80ce81ebc5286210a6 | |
parent | d9625399fb2e3d7152a2398def0cb6ab85d36329 [diff] [blame] |
Handle packed structs in the CBackend. llvm-svn: 39752
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp index 91f427f..b0c76c8 100644 --- a/llvm/lib/Target/CBackend/CBackend.cpp +++ b/llvm/lib/Target/CBackend/CBackend.cpp
@@ -466,7 +466,10 @@ printType(Out, *I, false, "field" + utostr(Idx++)); Out << ";\n"; } - return Out << '}'; + Out << '}'; + if (STy->isPacked()) + Out << " __attribute__ ((packed))"; + return Out; } case Type::PointerTyID: {