aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSection.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-09-12MC: Move MCSection::begin/end to header, NFCDuncan P. N. Exon Smith1-8/+0
llvm-svn: 281188
2016-08-22[MC] Remove guard(s). NFCI.Davide Italiano1-2/+0
All the methods are already marked with LLVM_DUMP_METHOD. llvm-svn: 279428
2016-01-29Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren1-1/+1
r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
2015-10-10MC: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith1-1/+1
llvm-svn: 249922
2015-10-05Fix pr24486.Rafael Espindola1-1/+1
This extends the work done in r233995 so that now getFragment (in addition to getSection) also works for variable symbols. With that the existing logic to decide if a-b can be computed works even if a or b are variables. Given that, the expression evaluation can avoid expanding variables as aggressively and that in turn lets the relocation code see the original variable. In order for this to work with the asm streamer, there is now a dummy fragment per section. It is used to assign a section to a symbol when no other fragment exists. This patch is a joint work by Maxim Ostapenko andy myself. llvm-svn: 249303
2015-06-01Store a bit in MCSection saying if it was registered with MCAssembler.Rafael Espindola1-1/+1
With this we can replace a SetVector with a plain std::vector. llvm-svn: 238706
2015-06-01Use a bitfield. NFC.Rafael Espindola1-1/+2
llvm-svn: 238705
2015-05-27Fix NDEBUG build.Rafael Espindola1-0/+2
llvm-svn: 238332
2015-05-27Delete MCSectionData.Rafael Espindola1-24/+23
llvm-svn: 238331
2015-05-27Delete dead code. NFC.Rafael Espindola1-4/+0
llvm-svn: 238330
2015-05-27Move getSubsectionInsertionPoint to MCSection.Rafael Espindola1-0/+32
llvm-svn: 238320
2015-05-26Stop using MCSectionData in MCAsmLayout.h.Rafael Espindola1-0/+2
llvm-svn: 238170
2015-05-25Turn MCSectionData into a field of MCSection.Rafael Espindola1-0/+11
This also changes MCAssembler to store a vector of MCSections instead of an iplist of MCSectionData. llvm-svn: 238159
2015-05-25Move MCSectionData to MCSection.h.Rafael Espindola1-0/+17
Another step in merging MCSectionData and MCSection. llvm-svn: 238158
2015-05-25Move bundle info from MCSectionData to MCSection.Rafael Espindola1-0/+18
llvm-svn: 238143
2015-05-21Move alignment from MCSectionData to MCSection.Rafael Espindola1-1/+1
This starts merging MCSection and MCSectionData. There are a few issues with the current split between MCSection and MCSectionData. * It optimizes the the not as important case. We want the production of .o files to be really fast, but the split puts the information used for .o emission in a separate data structure. * The ELF/COFF/MachO hierarchy is not represented in MCSectionData, leading to some ad-hoc ways to represent the various flags. * It makes it harder to remember where each item is. The attached patch starts merging the two by moving the alignment from MCSectionData to MCSection. Most of the patch is actually just dropping 'const', since MCSectionData is mutable, but MCSection was not. llvm-svn: 237936
2015-03-23Refactor how passes get a symbol at the end of a section.Rafael Espindola1-0/+9
There is now a canonical symbol at the end of a section that different passes can request. This also allows us to assert that we don't switch back to a section whose end symbol has already been printed. llvm-svn: 233026
2012-12-03Use the new script to sort the includes of every file under lib.Chandler Carruth1-1/+1
Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
2010-05-07switch MCSectionCOFF from a syntactic to semantic representation,Chris Lattner1-27/+0
patch by Peter Housel! llvm-svn: 103267
2010-03-22Put MCSectionCOFF::Name into the MCContext instead of leaking it.Jeffrey Yasskin1-1/+5
llvm-svn: 99231
2009-11-06Pass StringRef by value.Daniel Dunbar1-1/+1
llvm-svn: 86251
2009-08-22rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner1-1/+1
llvm-svn: 79777
2009-08-22Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner1-2/+2
llvm-svn: 79763
2009-08-13Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes1-85/+0
syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. llvm-svn: 78890
2009-08-13sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF ↵Chris Lattner1-16/+2
implementations. MCContext no longer maintains a string -> section map. llvm-svn: 78874
2009-08-10split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner1-269/+0
llvm-svn: 78576
2009-08-10Make the big switch: Change MCSectionMachO to represent a section *semantically*Chris Lattner1-11/+258
instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? llvm-svn: 78547
2009-08-09always end a section with \n on elf.Chris Lattner1-0/+2
llvm-svn: 78534
2009-08-08sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner1-7/+20
classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
2009-08-081. Make MCSection an abstract class.Chris Lattner1-5/+109
2. Move section switch printing to MCSection virtual method which takes a TAI. This eliminates textual formatting stuff from TLOF. 3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and TLOFELF::AtIsCommentChar. llvm-svn: 78510
2009-08-08make target-specific TLOF impls (except PIC16) create target-specificChris Lattner1-2/+2
MCSection instances. llvm-svn: 78500
2009-08-08stub out PECOFF/MachO/ELF MCSection classesChris Lattner1-2/+20
llvm-svn: 78499
2009-08-01Change SectionKind to be a property that is true of a *section*, itChris Lattner1-5/+6
should have no state that is specific to particular globals in the section. In this case, it means the removal of the "isWeak" and "ExplicitSection" bits. MCSection uses the new form of SectionKind. To handle isWeak, I introduced a new SectionInfo class, which is SectionKind + isWeak, and it is used by the part of the code generator that does classification of a specific global. The ExplicitSection disappears. It is moved onto MCSection as a new "IsDirective" bit. Since the Name of a section is either a section or directive, it makes sense to keep this bit in MCSection. Ultimately the creator of MCSection should canonicalize (e.g.) .text to whatever the actual section is. llvm-svn: 77803
2009-08-01All MCSections are now required to have a SectionKind.Chris Lattner1-8/+5
llvm-svn: 77787
2009-07-31split MCSection stuff out to its own .cpp file, add a newChris Lattner1-0/+31
MCSectionWithKind subclass of MCSection. llvm-svn: 77684