Avoid a spurious extra space character when printing empty structs.
llvm-svn: 56616
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 6cdf725..1fb229b 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -532,11 +532,12 @@
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;