From e9141ce3034b99aa726a77efce466d6554151f85 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 17 Mar 2015 14:22:31 +0000 Subject: [PATCH] Convert the easy cases of GetTempSymbol to createTempSymbol. In these cases no code was depending on GetTempSymbol finding an existing symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232478 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +- lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp | 2 +- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 +- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 ++-- lib/CodeGen/AsmPrinter/DwarfStringPool.cpp | 2 +- lib/Target/AArch64/AArch64AsmPrinter.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index ad2c6f4068b..509876863d1 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1575,7 +1575,7 @@ void AsmPrinter::EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, } // Otherwise, emit with .set (aka assignment). - MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++); + MCSymbol *SetLabel = createTempSymbol("set", SetCounter++); OutStreamer.EmitAssignment(SetLabel, Diff); OutStreamer.EmitSymbolValue(SetLabel, Size); } diff --git a/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp b/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp index dd509c402f6..28cc41ca366 100644 --- a/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp @@ -96,7 +96,7 @@ void DwarfAccelTable::FinalizeTable(AsmPrinter *Asm, StringRef Prefix) { for (size_t i = 0, e = Data.size(); i < e; ++i) { uint32_t bucket = Data[i]->HashValue % Header.bucket_count; Buckets[bucket].push_back(Data[i]); - Data[i]->Sym = Asm->GetTempSymbol(Prefix, i); + Data[i]->Sym = Asm->createTempSymbol(Prefix, i); } // Sort the contents of the buckets by hash value so that hash diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 029804c158a..eff65255288 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -380,7 +380,7 @@ void DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE, TLOF.getDwarfRangesSection()->getBeginSymbol(); RangeSpanList List( - Asm->GetTempSymbol("debug_ranges", DD->getNextRangeNumber()), + Asm->createTempSymbol("debug_ranges", DD->getNextRangeNumber()), std::move(Range)); // Under fission, ranges are specified by constant offsets relative to the diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 54539b112cf..63ec1835e68 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -927,7 +927,7 @@ DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP, DebugLocList &LocList = DotDebugLocEntries.back(); LocList.CU = &TheCU; LocList.Label = - Asm->GetTempSymbol("debug_loc", DotDebugLocEntries.size() - 1); + Asm->createTempSymbol("debug_loc", DotDebugLocEntries.size() - 1); // Build the location list for this variable. buildLocationList(LocList.List, Ranges); @@ -1669,7 +1669,7 @@ void DwarfDebug::emitDebugARanges() { // if we know the section name up-front. For user-created sections, the // resulting label may not be valid to use as a label. (section names can // use a greater set of characters on some systems) - Sym = Asm->GetTempSymbol("debug_end", ID); + Sym = Asm->createTempSymbol("debug_end", ID); Asm->OutStreamer.SwitchSection(Section); Asm->OutStreamer.EmitLabel(Sym); } diff --git a/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp b/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp index d76b66cac69..75249bed674 100644 --- a/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp @@ -19,7 +19,7 @@ getEntry(AsmPrinter &Asm, std::pair &Entry = Pool[Str]; if (!Entry.first) { Entry.second = Pool.size() - 1; - Entry.first = Asm.GetTempSymbol(Prefix, Entry.second); + Entry.first = Asm.createTempSymbol(Prefix, Entry.second); } return Entry; } diff --git a/lib/Target/AArch64/AArch64AsmPrinter.cpp b/lib/Target/AArch64/AArch64AsmPrinter.cpp index f8ebd66676b..92d86209d3d 100644 --- a/lib/Target/AArch64/AArch64AsmPrinter.cpp +++ b/lib/Target/AArch64/AArch64AsmPrinter.cpp @@ -464,7 +464,7 @@ void AArch64AsmPrinter::EmitInstruction(const MachineInstr *MI) { if (AArch64FI->getLOHRelated().count(MI)) { // Generate a label for LOH related instruction - MCSymbol *LOHLabel = GetTempSymbol("loh", LOHLabelCounter++); + MCSymbol *LOHLabel = createTempSymbol("loh", LOHLabelCounter++); // Associate the instruction with the label LOHInstToLabel[MI] = LOHLabel; OutStreamer.EmitLabel(LOHLabel); -- 2.34.1