diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-10-17 01:06:02 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-10-17 01:06:02 +0000 |
commit | 4544a4062c5cac54d61b4d13319b6dfc1004a65a (patch) | |
tree | 68b1144e3e40c9980099d91bd265d99916efe05e /llvm/lib/MC/MCContext.cpp | |
parent | 0680d8aa6887e8567825b270fe700da61f58259b (diff) | |
download | bcm5719-llvm-4544a4062c5cac54d61b4d13319b6dfc1004a65a.tar.gz bcm5719-llvm-4544a4062c5cac54d61b4d13319b6dfc1004a65a.zip |
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.
llvm-svn: 220010
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index ea6db142fd7..9d8a57e55f6 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -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; |