diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-25 17:37:20 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-25 17:37:20 +0000 |
commit | bb9a2115304795a54812f99ad0fedfb5fd24172e (patch) | |
tree | 37000a8bb9d7e190177a2efecf36f5353957864e /llvm/lib | |
parent | 5e490a75672d442ab1c7ae800d3819eef66716c7 (diff) | |
download | bcm5719-llvm-bb9a2115304795a54812f99ad0fedfb5fd24172e.tar.gz bcm5719-llvm-bb9a2115304795a54812f99ad0fedfb5fd24172e.zip |
Avoid a spurious extra space character when printing empty structs.
llvm-svn: 56616
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 6cdf72527bf..1fb229be33c 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -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; |