mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Revert commit r219835 and r219829.
Revert "Correctly handle references to section symbols." Revert "Allow forward references to section symbols." Rui found a regression I am debugging. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -113,30 +113,6 @@ MCSymbol *MCContext::GetOrCreateSymbol(StringRef Name) {
|
||||
return Sym;
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::getOrCreateSectionSymbol(const MCSectionELF &Section) {
|
||||
MCSymbol *&Sym = SectionSymbols[&Section];
|
||||
if (Sym)
|
||||
return Sym;
|
||||
|
||||
StringRef Name = Section.getSectionName();
|
||||
|
||||
StringMapEntry<MCSymbol*> &Entry = Symbols.GetOrCreateValue(Name);
|
||||
MCSymbol *OldSym = Entry.getValue();
|
||||
if (OldSym && OldSym->isUndefined()) {
|
||||
Sym = OldSym;
|
||||
return OldSym;
|
||||
}
|
||||
|
||||
StringMapEntry<bool> *NameEntry = &UsedNames.GetOrCreateValue(Name);
|
||||
NameEntry->setValue(true);
|
||||
Sym = new (*this) MCSymbol(NameEntry->getKey(), /*isTemporary*/ false);
|
||||
|
||||
if (!Entry.getValue())
|
||||
Entry.setValue(Sym);
|
||||
|
||||
return Sym;
|
||||
}
|
||||
|
||||
MCSymbol *MCContext::CreateSymbol(StringRef Name) {
|
||||
// Determine whether this is an assembler temporary or normal label, if used.
|
||||
bool isTemporary = false;
|
||||
|
Reference in New Issue
Block a user