diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-04-19 11:43:21 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-04-19 11:43:21 +0000 |
commit | 0baf8f427978164600f65c87b022e297639cd02d (patch) | |
tree | 8f5f40a41e7127193e7948b2a87278d14948e3c6 /llvm/lib/IR/Attributes.cpp | |
parent | feef8c246966bcf8f3e21e74155812c98d48bda2 (diff) | |
download | llvm-0baf8f427978164600f65c87b022e297639cd02d.zip llvm-0baf8f427978164600f65c87b022e297639cd02d.tar.gz llvm-0baf8f427978164600f65c87b022e297639cd02d.tar.bz2 |
Attributes: Don't print trailing whitespace on the function attribute comment.
llvm-svn: 179849
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 98dcecf..44fa78e 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -482,14 +482,13 @@ unsigned AttributeSetNode::getStackAlignment() const { std::string AttributeSetNode::getAsString(bool TargetIndependent, bool InAttrGrp) const { - std::string Str = ""; + std::string Str; for (SmallVectorImpl<Attribute>::const_iterator I = AttrList.begin(), - E = AttrList.end(); I != E; ) { + E = AttrList.end(); I != E; ++I) { if (TargetIndependent || !I->isStringAttribute()) { + if (I != AttrList.begin()) + Str += ' '; Str += I->getAsString(InAttrGrp); - if (++I != E) Str += " "; - } else { - ++I; } } return Str; |