MC: Change MCAssembler::Symbols to store MCSymbol, NFC

Instead of storing a list of the `MCSymbolData` in use, store the
`MCSymbol`s.  Churning in the direction of removing the back pointer
from `MCSymbolData`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-05-16 00:35:24 +00:00
parent ddf553bb8d
commit a5bb842d95
5 changed files with 17 additions and 18 deletions

View File

@@ -676,7 +676,7 @@ class MCAssembler {
public:
typedef iplist<MCSectionData> SectionDataListType;
typedef std::vector<MCSymbolData *> SymbolDataListType;
typedef std::vector<const MCSymbol *> SymbolDataListType;
typedef SectionDataListType::const_iterator const_iterator;
typedef SectionDataListType::iterator iterator;
@@ -1052,7 +1052,7 @@ public:
*Created = !hasSymbolData(Symbol);
if (!hasSymbolData(Symbol)) {
Symbol.getUnsafeData().initialize(Symbol, nullptr, 0);
Symbols.push_back(&Symbol.getData());
Symbols.push_back(&Symbol);
}
return Symbol.getData();
}