diff options
author | Eric Christopher <echristo@apple.com> | 2011-11-07 18:34:47 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-11-07 18:34:47 +0000 |
commit | c545322c276f933759e4140027e5f84e480d15d6 (patch) | |
tree | 4adf048b86b15c86e99ec1cd51a932bed2428a98 /lib/CodeGen/AsmPrinter | |
parent | 7135457efff83960bfad420f2dc3a5b4b58e8d07 (diff) | |
download | external_llvm-c545322c276f933759e4140027e5f84e480d15d6.zip external_llvm-c545322c276f933759e4140027e5f84e480d15d6.tar.gz external_llvm-c545322c276f933759e4140027e5f84e480d15d6.tar.bz2 |
Avoid the use of a local temporary for comment twines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp b/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp index 84a2839..2f175d4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp @@ -128,8 +128,7 @@ void DwarfAccelTable::EmitHeader(AsmPrinter *Asm) { void DwarfAccelTable::EmitBuckets(AsmPrinter *Asm) { unsigned index = 0; for (size_t i = 0; i < Buckets.size(); ++i) { - Twine Comment = Twine("Bucket ") + Twine(i); - Asm->OutStreamer.AddComment(Comment); + Asm->OutStreamer.AddComment("Bucket " + Twine(i)); if (Buckets[i].size() != 0) Asm->EmitInt32(index); else @@ -144,8 +143,7 @@ void DwarfAccelTable::EmitHashes(AsmPrinter *Asm) { for (size_t i = 0; i < Buckets.size(); ++i) { for (HashList::const_iterator HI = Buckets[i].begin(), HE = Buckets[i].end(); HI != HE; ++HI) { - Twine Comment = Twine("Hash in Bucket ") + Twine(i); - Asm->OutStreamer.AddComment(Comment); + Asm->OutStreamer.AddComment("Hash in Bucket " + Twine(i)); Asm->EmitInt32((*HI)->HashValue); } } @@ -159,8 +157,7 @@ void DwarfAccelTable::EmitOffsets(AsmPrinter *Asm, MCSymbol *SecBegin) { for (size_t i = 0; i < Buckets.size(); ++i) { for (HashList::const_iterator HI = Buckets[i].begin(), HE = Buckets[i].end(); HI != HE; ++HI) { - Twine Comment = Twine("Offset in Bucket ") + Twine(i); - Asm->OutStreamer.AddComment(Comment); + Asm->OutStreamer.AddComment("Offset in Bucket " + Twine(i)); MCContext &Context = Asm->OutStreamer.getContext(); const MCExpr *Sub = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create((*HI)->Sym, Context), |