diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-11-26 04:16:08 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-11-26 04:16:08 +0000 |
commit | 326990f1eb7ff005adabe46a1f982eff8835813e (patch) | |
tree | 138b1146e924a7ab49e6998bfaf81e3297ac0f77 /lib/MC/MCContext.cpp | |
parent | 706da9d8ca207c93d38855ffd96cf9722996d706 (diff) |
Fix Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r-- | lib/MC/MCContext.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp index 053639c517..23df840fb3 100644 --- a/lib/MC/MCContext.cpp +++ b/lib/MC/MCContext.cpp @@ -40,7 +40,7 @@ MCContext::MCContext(const MCAsmInfo &mai) : MAI(mai), NextUniqueID(0), MCContext::~MCContext() { // NOTE: The symbols are all allocated out of a bump pointer allocator, // we don't need to free them here. - + // If we have the MachO uniquing map, free it. delete (MachOUniqueMapTy*)MachOUniquingMap; delete (ELFUniqueMapTy*)ELFUniquingMap; @@ -56,10 +56,10 @@ MCContext::~MCContext() { MCSymbol *MCContext::GetOrCreateSymbol(StringRef Name) { assert(!Name.empty() && "Normal symbols cannot be unnamed!"); - + // Determine whether this is an assembler temporary or normal label. bool isTemporary = Name.startswith(MAI.getPrivateGlobalPrefix()); - + // Do the lookup and get the entire StringMapEntry. We want access to the // key if we are creating the entry. StringMapEntry<MCSymbol*> &Entry = Symbols.GetOrCreateValue(Name); @@ -123,26 +123,26 @@ const MCSectionMachO *MCContext:: getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind Kind) { - + // We unique sections by their segment/section pair. The returned section // may not have the same flags as the requested section, if so this should be // diagnosed by the client as an error. - + // Create the map if it doesn't already exist. if (MachOUniquingMap == 0) MachOUniquingMap = new MachOUniqueMapTy(); MachOUniqueMapTy &Map = *(MachOUniqueMapTy*)MachOUniquingMap; - + // Form the name to look up. SmallString<64> Name; Name += Segment; Name.push_back(','); Name += Section; - + // Do the lookup, if we have a hit, return it. const MCSectionMachO *&Entry = Map[Name.str()]; if (Entry) return Entry; - + // Otherwise, return a new section. return Entry = new (*this) MCSectionMachO(Segment, Section, TypeAndAttributes, Reserved2, Kind); @@ -160,11 +160,11 @@ getELFSection(StringRef Section, unsigned Type, unsigned Flags, if (ELFUniquingMap == 0) ELFUniquingMap = new ELFUniqueMapTy(); ELFUniqueMapTy &Map = *(ELFUniqueMapTy*)ELFUniquingMap; - + // Do the lookup, if we have a hit, return it. StringMapEntry<const MCSectionELF*> &Entry = Map.GetOrCreateValue(Section); if (Entry.getValue()) return Entry.getValue(); - + // Possibly refine the entry size first. if (!EntrySize) { EntrySize = MCSectionELF::DetermineEntrySize(Kind); @@ -194,15 +194,15 @@ const MCSection *MCContext::getCOFFSection(StringRef Section, if (COFFUniquingMap == 0) COFFUniquingMap = new COFFUniqueMapTy(); COFFUniqueMapTy &Map = *(COFFUniqueMapTy*)COFFUniquingMap; - + // Do the lookup, if we have a hit, return it. StringMapEntry<const MCSectionCOFF*> &Entry = Map.GetOrCreateValue(Section); if (Entry.getValue()) return Entry.getValue(); - + MCSectionCOFF *Result = new (*this) MCSectionCOFF(Entry.getKey(), Characteristics, Selection, Kind); - + Entry.setValue(Result); return Result; } @@ -261,7 +261,7 @@ unsigned MCContext::GetDwarfFile(StringRef FileName, unsigned FileNumber) { // stored at MCDwarfFiles[FileNumber].Name . DirIndex++; } - + // Now make the MCDwarfFile entry and place it in the slot in the MCDwarfFiles // vector. char *Buf = static_cast<char *>(Allocate(Name.size())); |