[llvm-commits] [llvm] r56616 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Dan Gohman
gohman at apple.com
Thu Sep 25 10:37:23 PDT 2008
Author: djg
Date: Thu Sep 25 12:37:20 2008
New Revision: 56616
URL: http://llvm.org/viewvc/llvm-project?rev=56616&view=rev
Log:
Avoid a spurious extra space character when printing empty structs.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=56616&r1=56615&r2=56616&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Thu Sep 25 12:37:20 2008
@@ -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;
More information about the llvm-commits
mailing list