aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm2cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-11 12:41:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-11 12:41:49 +0000
commit46fea1088193c79c9614235285470aac21a79790 (patch)
treee2dc1f1e95bec43813335248cda75b7aa2dd9100 /tools/llvm2cpp
parent07441666b63303e82b287d6d5f2ec94ae69d76b8 (diff)
downloadexternal_llvm-46fea1088193c79c9614235285470aac21a79790.zip
external_llvm-46fea1088193c79c9614235285470aac21a79790.tar.gz
external_llvm-46fea1088193c79c9614235285470aac21a79790.tar.bz2
Teach llvm2cpp about packed structure types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp')
-rw-r--r--tools/llvm2cpp/CppWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm2cpp/CppWriter.cpp b/tools/llvm2cpp/CppWriter.cpp
index c2dadad..2533752 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;
}