From 43f344a26695ba85a1a0b5407c038d9c3f980327 Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Mon, 8 Jan 2007 18:21:30 +0000 Subject: [PATCH] And asm writing for packed struct initializers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33016 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 64cac8c518c..704334b78ac 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -501,6 +501,8 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, Out << " ]"; } } else if (const ConstantStruct *CS = dyn_cast(CV)) { + if (CS->getType()->isPacked()) + Out << '<'; Out << '{'; unsigned N = CS->getNumOperands(); if (N) { @@ -525,6 +527,8 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, } Out << " }"; + if (CS->getType()->isPacked()) + Out << '>'; } else if (const ConstantPacked *CP = dyn_cast(CV)) { const Type *ETy = CP->getType()->getElementType(); assert(CP->getNumOperands() > 0 &&