aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
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)) {