mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
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
This commit is contained in:
parent
7135457eff
commit
c545322c27
@ -128,8 +128,7 @@ void DwarfAccelTable::EmitHeader(AsmPrinter *Asm) {
|
|||||||
void DwarfAccelTable::EmitBuckets(AsmPrinter *Asm) {
|
void DwarfAccelTable::EmitBuckets(AsmPrinter *Asm) {
|
||||||
unsigned index = 0;
|
unsigned index = 0;
|
||||||
for (size_t i = 0; i < Buckets.size(); ++i) {
|
for (size_t i = 0; i < Buckets.size(); ++i) {
|
||||||
Twine Comment = Twine("Bucket ") + Twine(i);
|
Asm->OutStreamer.AddComment("Bucket " + Twine(i));
|
||||||
Asm->OutStreamer.AddComment(Comment);
|
|
||||||
if (Buckets[i].size() != 0)
|
if (Buckets[i].size() != 0)
|
||||||
Asm->EmitInt32(index);
|
Asm->EmitInt32(index);
|
||||||
else
|
else
|
||||||
@ -144,8 +143,7 @@ void DwarfAccelTable::EmitHashes(AsmPrinter *Asm) {
|
|||||||
for (size_t i = 0; i < Buckets.size(); ++i) {
|
for (size_t i = 0; i < Buckets.size(); ++i) {
|
||||||
for (HashList::const_iterator HI = Buckets[i].begin(),
|
for (HashList::const_iterator HI = Buckets[i].begin(),
|
||||||
HE = Buckets[i].end(); HI != HE; ++HI) {
|
HE = Buckets[i].end(); HI != HE; ++HI) {
|
||||||
Twine Comment = Twine("Hash in Bucket ") + Twine(i);
|
Asm->OutStreamer.AddComment("Hash in Bucket " + Twine(i));
|
||||||
Asm->OutStreamer.AddComment(Comment);
|
|
||||||
Asm->EmitInt32((*HI)->HashValue);
|
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 (size_t i = 0; i < Buckets.size(); ++i) {
|
||||||
for (HashList::const_iterator HI = Buckets[i].begin(),
|
for (HashList::const_iterator HI = Buckets[i].begin(),
|
||||||
HE = Buckets[i].end(); HI != HE; ++HI) {
|
HE = Buckets[i].end(); HI != HE; ++HI) {
|
||||||
Twine Comment = Twine("Offset in Bucket ") + Twine(i);
|
Asm->OutStreamer.AddComment("Offset in Bucket " + Twine(i));
|
||||||
Asm->OutStreamer.AddComment(Comment);
|
|
||||||
MCContext &Context = Asm->OutStreamer.getContext();
|
MCContext &Context = Asm->OutStreamer.getContext();
|
||||||
const MCExpr *Sub =
|
const MCExpr *Sub =
|
||||||
MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create((*HI)->Sym, Context),
|
MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create((*HI)->Sym, Context),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user