From 5527c0b6d1bda2c63212f91837792663469fd764 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 20 Aug 2004 15:37:30 +0000 Subject: [PATCH] Fix a bug found exposed by: Regression/Other/2004-08-20-PackedControlFlow.ll Packed types need to be allowed in type statements too. Patch provided by Brad Jones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15953 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 9fc772ecba5..b109cb006eb 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -727,7 +727,11 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) { } else if (const ArrayType *ATy = dyn_cast(Ty)) { Out << '[' << ATy->getNumElements() << " x "; printType(ATy->getElementType()) << ']'; - } else if (const OpaqueType *OTy = dyn_cast(Ty)) { + } else if (const PackedType *PTy = dyn_cast(Ty)) { + Out << '<' << PTy->getNumElements() << " x "; + printType(PTy->getElementType()) << '>'; + } + else if (const OpaqueType *OTy = dyn_cast(Ty)) { Out << "opaque"; } else { if (!Ty->isPrimitiveType()) -- 2.11.0