Avoid a spurious extra space character when printing empty structs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-09-25 17:37:20 +00:00
parent 5dd9c2e9ae
commit 0c8927efed

View File

@ -532,11 +532,12 @@ static void calcTypeName(const Type *Ty,
Result += "{ ";
for (StructType::element_iterator I = STy->element_begin(),
E = STy->element_end(); I != E; ++I) {
if (I != STy->element_begin())
Result += ", ";
calcTypeName(*I, TypeStack, TypeNames, Result);
if (next(I) != STy->element_end())
Result += ',';
Result += ' ';
}
Result += " }";
Result += '}';
if (STy->isPacked())
Result += '>';
break;