[llvm-commits] [llvm] r143974 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
Eric Christopher
echristo at apple.com
Mon Nov 7 10:34:48 PST 2011
Author: echristo
Date: Mon Nov 7 12:34:47 2011
New Revision: 143974
URL: http://llvm.org/viewvc/llvm-project?rev=143974&view=rev
Log:
Avoid the use of a local temporary for comment twines.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp?rev=143974&r1=143973&r2=143974&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp Mon Nov 7 12:34:47 2011
@@ -128,8 +128,7 @@
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 @@
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 @@
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),
More information about the llvm-commits
mailing list