Map directly from signature symbol to group index. NFC.
[oota-llvm.git] / lib / MC / MCContext.cpp
index a43bdc7bfa21225fa34f9609df76f951405625cb..fd0422daf2935063f7a49bb2c879c5246b3f0680 100644 (file)
@@ -125,8 +125,7 @@ MCSymbol *MCContext::getOrCreateSectionSymbol(const MCSectionELF &Section) {
   }
 
   auto NameIter = UsedNames.insert(std::make_pair(Name, true)).first;
-  Sym = new (*this) MCSymbol(NameIter->getKey(), /*isTemporary*/ false,
-                             MAI->noSymbolNameQuoting());
+  Sym = new (*this) MCSymbol(NameIter->getKey(), /*isTemporary*/ false);
 
   if (!OldSym)
     OldSym = Sym;
@@ -164,8 +163,7 @@ MCSymbol *MCContext::CreateSymbol(StringRef Name, bool AlwaysAddSuffix) {
       // Ok, we found a name. Have the MCSymbol object itself refer to the copy
       // of the string that is embedded in the UsedNames entry.
       MCSymbol *Result =
-        new (*this) MCSymbol(NameEntry.first->getKey(), IsTemporary,
-                             MAI->noSymbolNameQuoting());
+          new (*this) MCSymbol(NameEntry.first->getKey(), IsTemporary);
       return Result;
     }
     assert(IsTemporary && "Cannot rename non-temporary symbols");
@@ -339,10 +337,10 @@ const MCSectionELF *MCContext::getELFSection(StringRef Section, unsigned Type,
   return Result;
 }
 
-const MCSectionELF *MCContext::CreateELFGroupSection() {
+const MCSectionELF *MCContext::createELFGroupSection(const MCSymbol *Group) {
   MCSectionELF *Result = new (*this)
       MCSectionELF(".group", ELF::SHT_GROUP, 0, SectionKind::getReadOnly(), 4,
-                   nullptr, ~0, nullptr, nullptr);
+                   Group, ~0, nullptr, nullptr);
   return Result;
 }