llvm/lib/MC
Rafael Espindola 41cea417fa There is only one current section.
Both MCStreamer and MCObjectStreamer were maintaining a current section
variable and they were slightly out of sync. I don't think this was observable,
but was inefficient and error prone.

Changing this requires a few cascading changes:

* SwitchSection has to call ChangeSection earlier for ChangeSection to see
  the old section.
* With that change, ChangeSection cannot call EmitLabel, since during
  ChangeSection we are still in the old section.
* When the object streamer requires a begin label, just reused the existing
  generic support for begin labels instead of calling EmitLabel directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238357 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-27 20:52:32 +00:00
..
MCDisassembler MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
MCParser There is only one current section. 2015-05-27 20:52:32 +00:00
CMakeLists.txt Move some methods to a new MCInstrDesc.cpp file to allow includes to be trimmed. NFC. 2015-05-15 21:29:43 +00:00
ConstantPools.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
ELFObjectWriter.cpp There is only one current section. 2015-05-27 20:52:32 +00:00
LLVMBuild.txt Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MachObjectWriter.cpp Remove uses of MCSectionData from MachObjectWriter.cpp. 2015-05-27 14:33:39 +00:00
Makefile Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MCAsmBackend.cpp Simplify a really complicated check for Arch == X86_64. 2014-03-11 21:22:57 +00:00
MCAsmInfo.cpp MC: Clean up method names in MCContext. 2015-05-18 18:43:14 +00:00
MCAsmInfoCOFF.cpp [MC] Use LShr for constant evaluation of ">>" on ELF/arm64--darwin. 2015-04-28 01:37:11 +00:00
MCAsmInfoDarwin.cpp [MC] Use LShr for constant evaluation of ">>" on ELF/arm64--darwin. 2015-04-28 01:37:11 +00:00
MCAsmInfoELF.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
MCAsmStreamer.cpp We always have an InstPrinter. 2015-05-27 12:13:06 +00:00
MCAssembler.cpp Delete MCSectionData. 2015-05-27 15:14:11 +00:00
MCCodeEmitter.cpp MC: Move target specific fixup info descriptors to TargetAsmBackend instead of 2010-12-16 03:20:06 +00:00
MCCodeGenInfo.cpp MC: MCCodeGenInfo naming update. NFC. 2015-05-15 19:13:31 +00:00
MCContext.cpp Move MCSection destruction to MCContext::reset. 2015-05-26 01:52:19 +00:00
MCDwarf.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
MCELF.cpp Add STB_GNU_UNIQUE to the ELF writer. 2015-01-23 04:44:35 +00:00
MCELFObjectTargetWriter.cpp Re-enable target-specific relocation table sorting and use it for Mips 2015-04-14 13:23:34 +00:00
MCELFStreamer.cpp There is only one current section. 2015-05-27 20:52:32 +00:00
MCExpr.cpp Use operator<< instead of print in a few more places. 2015-05-27 13:05:42 +00:00
MCInst.cpp Fixup. 2015-02-05 01:13:47 +00:00
MCInstPrinter.cpp Format: Modernize using variadic templates. 2015-02-15 22:15:41 +00:00
MCInstrAnalysis.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCInstrDesc.cpp Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
MCLabel.cpp Release build: guard dump functions with 2012-09-12 05:06:18 +00:00
MCLinkerOptimizationHint.cpp MC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC 2015-05-20 00:02:39 +00:00
MCMachObjectTargetWriter.cpp MC/Mach-O: On second thought, use a custom hook for enabling aggressive 2010-12-17 05:50:29 +00:00
MCMachOStreamer.cpp There is only one current section. 2015-05-27 20:52:32 +00:00
MCNullStreamer.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
MCObjectFileInfo.cpp Revert r238190 and r238197: [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only. 2015-05-27 08:44:01 +00:00
MCObjectStreamer.cpp There is only one current section. 2015-05-27 20:52:32 +00:00
MCObjectWriter.cpp Return a MCSection from MCFragment::getParent(). 2015-05-26 00:36:57 +00:00
MCRegisterInfo.cpp Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
MCSection.cpp Fix NDEBUG build. 2015-05-27 15:18:34 +00:00
MCSectionCOFF.cpp MC: Emit COFF section flags in the "proper" order 2015-02-07 08:26:40 +00:00
MCSectionELF.cpp Use a comma after the unique keyword. 2015-04-06 16:34:41 +00:00
MCSectionMachO.cpp Implement unique sections with an unique ID. 2015-04-04 18:02:01 +00:00
MCStreamer.cpp There is only one current section. 2015-05-27 20:52:32 +00:00
MCSubtargetInfo.cpp Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
MCSymbol.cpp Use operator<< instead of print in a few more places. 2015-05-27 13:05:42 +00:00
MCSymbolizer.cpp Move MCSymbolizer's constructor into header. It's trivial - there's no need for 2014-03-27 02:42:52 +00:00
MCTargetOptions.cpp Migrate ABIName to MCTargetOptions so that it can be shared between 2015-01-14 00:50:31 +00:00
MCValue.cpp Use operator<< instead of print in a few more places. 2015-05-27 13:05:42 +00:00
MCWin64EH.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
MCWinEH.cpp Move alignment from MCSectionData to MCSection. 2015-05-21 19:20:38 +00:00
StringTableBuilder.cpp MachObjectWriter: optimize the string table for common suffices 2014-10-06 17:05:19 +00:00
SubtargetFeature.cpp Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
WinCOFFObjectWriter.cpp Stop using MCSectionData in WinCOFFObjectWriter.cpp. 2015-05-27 14:45:54 +00:00
WinCOFFStreamer.cpp Replace getOrCreateSectionData with registerSection. 2015-05-26 15:07:25 +00:00
YAML.cpp Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00