aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-12-08 18:06:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-12-08 18:06:16 +0000
commit38ecbf18eb9c8ca7ae08dfed4dc6fb4e3e5deb1e (patch)
tree25f918d862f8baff414df9382c194b5b5e072de1 /lib/VMCore/AsmWriter.cpp
parent8894255fc01cd8dcdccc700fdd69186d02131ffe (diff)
Packed Structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index a0d82bc402..1647f51da9 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -287,6 +287,8 @@ static void calcTypeName(const Type *Ty,
}
case Type::StructTyID: {
const StructType *STy = cast<StructType>(Ty);
+ if (STy->isPacked())
+ Result += '<';
Result += "{ ";
for (StructType::element_iterator I = STy->element_begin(),
E = STy->element_end(); I != E; ++I) {
@@ -295,6 +297,8 @@ static void calcTypeName(const Type *Ty,
calcTypeName(*I, TypeStack, TypeNames, Result);
}
Result += " }";
+ if (STy->isPacked())
+ Result += '>';
break;
}
case Type::PointerTyID:
@@ -699,6 +703,8 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) {
}
Out << ')';
} else if (const StructType *STy = dyn_cast<StructType>(Ty)) {
+ if (STy->isPacked())
+ Out << '<';
Out << "{ ";
for (StructType::element_iterator I = STy->element_begin(),
E = STy->element_end(); I != E; ++I) {
@@ -707,6 +713,8 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) {
printType(*I);
}
Out << " }";
+ if (STy->isPacked())
+ Out << '>';
} else if (const PointerType *PTy = dyn_cast<PointerType>(Ty)) {
printType(PTy->getElementType()) << '*';
} else if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) {