projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dd9c2e
)
Avoid a spurious extra space character when printing empty structs.
author
Dan Gohman
<gohman@apple.com>
Thu, 25 Sep 2008 17:37:20 +0000
(17:37 +0000)
committer
Dan Gohman
<gohman@apple.com>
Thu, 25 Sep 2008 17:37:20 +0000
(17:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56616
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/AsmWriter.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/AsmWriter.cpp
b/lib/VMCore/AsmWriter.cpp
index 6cdf72527bfb3df22e6dc55938c718d95fad38a8..1fb229be33c6da6787d0c4ca28688578e98a1cf1 100644
(file)
--- a/
lib/VMCore/AsmWriter.cpp
+++ b/
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;