summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Incorporate suggestions by Daniel Dunbar after his review. Thanks Daniel!Kevin Enderby2010-10-041-7/+3
| | | | | | | | | | | | | | | | 1) Changed ValidateDwarfFileNumber() to isValidDwarfFileNumber() to be better named. Since it is just a predicate and isn't actually changing any state. 2) Added a missing return in the comments for setCurrentDwarfLoc() in include/llvm/MC/MCContext.h for fix formatting. 3) Changed clearDwarfLocSeen() to ClearDwarfLocSeen() since it does change state. 4) Simplified the last test in isValidDwarfFileNumber() to just a one line boolean test of MCDwarfFiles[FileNumber] != 0 for the final return statement. llvm-svn: 115551
* Move logic of determining ELF entsize from the .s printer to initializationJan Wen Voung2010-09-301-0/+4
| | | | | | | time. That way, the EntrySize field is initialized for other code paths, namely, the .ll -> .o code path. llvm-svn: 115141
* This is the second of three patches to implement support for the .loc directiveKevin Enderby2010-08-311-1/+1
| | | | | | | | | | and output the dwarf line number tables. This takes the current loc info after an instruction is assembled and saves the needed info into an object that has vector and for each section. These objects will be used for the final patch to build and emit the encoded dwarf line number tables. Again for now this is only in the Mach-O streamer but at some point will move to a more generic place. llvm-svn: 112668
* First bit of support for the dwarf .loc directive. This patch updates theKevin Enderby2010-08-241-1/+17
| | | | | | | | | | needed parsing for the .loc directive and saves the current info from that into the context. The next patch will take the current loc info after an instruction is assembled and save that info into a vector for each section for use to build the line number tables. The patch after that will encode the info from those vectors into the output file as the dwarf line tables. llvm-svn: 111956
* Add ELF ObjectWriter and Streamer support.Matt Fleming2010-08-161-2/+2
| | | | llvm-svn: 111172
* Next bit of support for the dwarf .file directive. This patch takes theKevin Enderby2010-08-091-1/+6
| | | | | | | | previously collected info from the .file directives and outputs the encoded bytes for it. For now this is only in the Mach-O streamer but at some point will move to a more generic place. llvm-svn: 110617
* Stop leaking std::strings in GetDwarfFile.Benjamin Kramer2010-07-291-8/+8
| | | | llvm-svn: 109746
* Added first bit of support for the dwarf .file directive. This patch collectsKevin Enderby2010-07-281-0/+61
| | | | | | | the info from the .file directive and makes file and directory tables that will eventually be put out as part of the dwarf info in the output file. llvm-svn: 109651
* Convert some tab stops into spaces.Duncan Sands2010-07-121-2/+2
| | | | llvm-svn: 108130
* Added the darwin .secure_log_unique and .secure_log_reset directives.Kevin Enderby2010-06-281-0/+7
| | | | llvm-svn: 107077
* Simplify MCContext::(Next|Get)InstanceBenjamin Kramer2010-05-181-24/+8
| | | | | | | - Allocate MCLabels in the context so they don't leak. - Avoid duplicated densemap lookup. llvm-svn: 104020
* Added support in MC for Directional Local Labels.Kevin Enderby2010-05-171-0/+45
| | | | llvm-svn: 103989
* add COFF support for COMDAT sections, patch by Nathan Jeffords!Chris Lattner2010-05-071-4/+7
| | | | llvm-svn: 103304
* switch MCSectionCOFF from a syntactic to semantic representation,Chris Lattner2010-05-071-1/+20
| | | | | | patch by Peter Housel! llvm-svn: 103267
* move elf section uniquing to MCContext. Along the wayChris Lattner2010-04-081-2/+26
| | | | | | merge XCore's section into MCSectionELF llvm-svn: 100812
* move macho section uniquing from MCParser and TLOF to MCContext whereChris Lattner2010-04-081-2/+46
| | | | | | | the compiler and asmparser now unique to the same sections. This fixes rdar://7835021. llvm-svn: 100807
* Rip out the 'is temporary' nonsense from the MCContext interface toChris Lattner2010-03-301-12/+8
| | | | | | | | | create symbols. It is extremely error prone and a source of a lot of the remaining integrated assembler bugs on x86-64. This fixes rdar://7807601. llvm-svn: 99902
* fix GetOrCreateTemporarySymbol to require a name, clientsChris Lattner2010-03-171-11/+0
| | | | | | | should use CreateTempSymbol() if they don't care about the name. llvm-svn: 98712
* fix a memory leak yjasskin pointed out: MCSymbol is bump pointerChris Lattner2010-03-151-10/+14
| | | | | | | | | | allocated and thus not freed. This is cool except that it contains and std::string so the string data didn't get freed. In any case there is no reason to redundantly store the string data in the MCSymbol anyway, just make the MCSymbol ref the string data in the MCContext StringMap. llvm-svn: 98536
* add a new CreateTempSymbol method, the use case forChris Lattner2010-03-141-0/+6
| | | | | | | CreateTempSymbol vs GetOrCreateTemporarySymbol are completely different. llvm-svn: 98486
* enhance MCContext::GetOrCreateTemporarySymbol() to create a new symbolChris Lattner2010-03-111-0/+6
| | | | | | with an arbitrary unique name. llvm-svn: 98294
* change MCContext to always have an MCAsmInfo.Chris Lattner2010-03-111-1/+1
| | | | llvm-svn: 98293
* empty symbols aren't possible, the mcsymbol ctor aborts on them.Chris Lattner2010-03-111-4/+0
| | | | llvm-svn: 98288
* Remove unneeded includes.Daniel Dunbar2010-03-101-1/+0
| | | | llvm-svn: 98167
* eliminate MCContext::CreateSymbol and CreateTemporarySymbol.Chris Lattner2010-03-101-11/+10
| | | | | | | Add a new GetOrCreateTemporarySymbol method and a version that takes a twine. llvm-svn: 98118
* Pass StringRef by value.Daniel Dunbar2009-11-061-4/+4
| | | | llvm-svn: 86251
* add a twine version of MCContext::GetOrCreateSymbol.Chris Lattner2009-10-191-1/+9
| | | | llvm-svn: 84561
* MC: Switch MCContext value table to storing MCExprs.Daniel Dunbar2009-10-161-17/+0
| | | | llvm-svn: 84228
* llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.Daniel Dunbar2009-08-261-1/+0
| | | | | | | | - I moved section creation back into AsmParser. I think policy decisions like this should be pushed higher, not lower, when possible (in addition the assembler has flags which change this behavior, for example). llvm-svn: 80162
* llvm-mc: Change MCContext value table to take const MCSymbol*s.Daniel Dunbar2009-08-261-4/+4
| | | | llvm-svn: 80079
* sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF ↵Chris Lattner2009-08-131-5/+0
| | | | | | | | implementations. MCContext no longer maintains a string -> section map. llvm-svn: 78874
* add some comments: MCContext owns the MCSections, but it bump pointer allocatesChris Lattner2009-08-131-0/+2
| | | | | | them, so it doesn't have to explicitly free them. llvm-svn: 78870
* split MCSection stuff out to its own .cpp file, add a newChris Lattner2009-07-311-12/+0
| | | | | | MCSectionWithKind subclass of MCSection. llvm-svn: 77684
* create sections with MCSection::Create instead of Context->getOrCreateSection.Chris Lattner2009-07-311-8/+15
| | | | | | This is needed to allow polymorphic sections. llvm-svn: 77680
* Move MCContext and friends to StringRef based APIs.Daniel Dunbar2009-07-271-6/+6
| | | | llvm-svn: 77251
* We decided to not worry about Atoms for now, it should be straightforward toDaniel Dunbar2009-06-241-17/+6
| | | | | | | | reintroduce them later. Also, don't require MCSection* when creating a symbol. llvm-svn: 74081
* add trivial support for passing label definitions through the MCStreamer.Chris Lattner2009-06-241-0/+14
| | | | | | | This is suboptimal in several aspects, see the commented out assertion. I need to talk to Daniel about this. llvm-svn: 74057
* Start MCAsmStreamer implementation.Daniel Dunbar2009-06-241-5/+5
| | | | llvm-svn: 74044
* Update for MCImm -> MCValue rename.Daniel Dunbar2009-06-231-5/+5
| | | | llvm-svn: 74024
* Start flushing out MCContext.Daniel Dunbar2009-06-231-0/+77
- Lives inside new library lib/MC (LLVMMC.a) llvm-svn: 74013
OpenPOWER on IntegriCloud