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:
Rafael Espindola
2014-10-17 01:06:02 +00:00
parent 46b94aa80e
commit 70a1be3f76
9 changed files with 52 additions and 195 deletions

View File

@@ -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;