Convert the easy cases of GetTempSymbol to createTempSymbol.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Mar 2015 14:22:31 +0000 (14:22 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 17 Mar 2015 14:22:31 +0000 (14:22 +0000)
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
lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
lib/Target/AArch64/AArch64AsmPrinter.cpp

index ad2c6f4068b75db4067068bb571ecbd364f0e9f0..509876863d1a7937cdaea92348ea993ae646ee07 100644 (file)
@@ -1575,7 +1575,7 @@ void AsmPrinter::EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo,
   }
 
   // Otherwise, emit with .set (aka assignment).
   }
 
   // Otherwise, emit with .set (aka assignment).
-  MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++);
+  MCSymbol *SetLabel = createTempSymbol("set", SetCounter++);
   OutStreamer.EmitAssignment(SetLabel, Diff);
   OutStreamer.EmitSymbolValue(SetLabel, Size);
 }
   OutStreamer.EmitAssignment(SetLabel, Diff);
   OutStreamer.EmitSymbolValue(SetLabel, Size);
 }
index dd509c402f64631a6a9b0532221045d8b16cbca7..28cc41ca366ddc8c70ac2ca405ba35995e17e3dc 100644 (file)
@@ -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]);
   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
   }
 
   // Sort the contents of the buckets by hash value so that hash
index 029804c158a0a80c41c94559da699fdc47397b19..eff65255288f15602814474e2d7257ebb0208f67 100644 (file)
@@ -380,7 +380,7 @@ void DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE,
       TLOF.getDwarfRangesSection()->getBeginSymbol();
 
   RangeSpanList List(
       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
       std::move(Range));
 
   // Under fission, ranges are specified by constant offsets relative to the
index 54539b112cfa5a41b50a724fd34292e5388314e5..63ec1835e68022aa8523c140af26887995e75882 100644 (file)
@@ -927,7 +927,7 @@ DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP,
     DebugLocList &LocList = DotDebugLocEntries.back();
     LocList.CU = &TheCU;
     LocList.Label =
     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);
 
     // 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)
       // 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);
     }
       Asm->OutStreamer.SwitchSection(Section);
       Asm->OutStreamer.EmitLabel(Sym);
     }
index d76b66cac69fb372474cf34a67b95d314d26cbcd..75249bed674c8766281c0d3d74f372f63111b13f 100644 (file)
@@ -19,7 +19,7 @@ getEntry(AsmPrinter &Asm,
   std::pair<MCSymbol *, unsigned> &Entry = Pool[Str];
   if (!Entry.first) {
     Entry.second = Pool.size() - 1;
   std::pair<MCSymbol *, unsigned> &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;
 }
   }
   return Entry;
 }
index f8ebd66676b4cfc01922cea79861e54c0ab98b81..92d86209d3da356fd8ad0b7df9f4fe2fadfbc4c7 100644 (file)
@@ -464,7 +464,7 @@ void AArch64AsmPrinter::EmitInstruction(const MachineInstr *MI) {
 
   if (AArch64FI->getLOHRelated().count(MI)) {
     // Generate a label for LOH related instruction
 
   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);
     // Associate the instruction with the label
     LOHInstToLabel[MI] = LOHLabel;
     OutStreamer.EmitLabel(LOHLabel);