sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.

MCContext no longer maintains a string -> section map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78874 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-08-13 00:37:15 +00:00
parent f991ecf723
commit 38cff389af
6 changed files with 49 additions and 42 deletions

View File

@@ -22,11 +22,6 @@ MCContext::~MCContext() {
// we don't need to free them here.
}
MCSection *MCContext::GetSection(const StringRef &Name) const {
StringMap<MCSection*>::const_iterator I = Sections.find(Name);
return I != Sections.end() ? I->second : 0;
}
MCSymbol *MCContext::CreateSymbol(const StringRef &Name) {
assert(Name[0] != '\0' && "Normal symbols cannot be unnamed!");