[llvm-commits] CVS: llvm/tools/llvm2cpp/CppWriter.cpp

Reid Spencer reid at x10sys.com
Wed Apr 11 05:42:06 PDT 2007



Changes in directory llvm/tools/llvm2cpp:

CppWriter.cpp updated: 1.45 -> 1.46
---
Log message:

Teach llvm2cpp about packed structure types.


---
Diffs of the changes:  (+2 -1)

 CppWriter.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/tools/llvm2cpp/CppWriter.cpp
diff -u llvm/tools/llvm2cpp/CppWriter.cpp:1.45 llvm/tools/llvm2cpp/CppWriter.cpp:1.46
--- llvm/tools/llvm2cpp/CppWriter.cpp:1.45	Wed Apr 11 07:28:56 2007
+++ llvm/tools/llvm2cpp/CppWriter.cpp	Wed Apr 11 07:41:49 2007
@@ -515,7 +515,8 @@
         nl(Out);
       }
       Out << "StructType* " << typeName << " = StructType::get("
-          << typeName << "_fields);";
+          << typeName << "_fields, /*isPacked=*/"
+          << (ST->isPacked() ? "true" : "false") << ");";
       nl(Out);
       break;
     }






More information about the llvm-commits mailing list