Daniel Dunbar
5d8c7d0d36
MC: Add support for disabling "temporary label" behavior. Useful for debugging
...
on Darwin.
llvm-svn: 128430
2011-03-28 22:49:15 +00:00
Rafael Espindola
0e665e502d
Fixed version of 121434 with no new memory leaks.
...
llvm-svn: 121471
2010-12-10 07:39:47 +00:00
Rafael Espindola
011e168728
Revert my previous patch to make the valgrind bots happy.
...
llvm-svn: 121461
2010-12-10 04:01:09 +00:00
Rafael Espindola
03ad1e8f1f
Initial support for the cfi directives. This is just enough to get
...
f:
.cfi_startproc
nop
.cfi_endproc
assembled (on ELF).
llvm-svn: 121434
2010-12-09 23:48:29 +00:00
Devang Patel
77a1457f1a
It may not be an option to skip .debug_line if there are file reference in already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries.
...
llvm-svn: 120760
2010-12-03 00:10:48 +00:00
Chris Lattner
bcbf37aeea
tidy up
...
llvm-svn: 120644
2010-12-02 01:29:39 +00:00
Devang Patel
525de51e78
If tehre are not any line entry then do not try to emit .debug_line section.
...
llvm-svn: 120637
2010-12-02 01:17:51 +00:00
Rafael Espindola
16b64c646a
Rename temporary symbols if they conflict with artificial symbols created
...
by the assembler. This was blocking parsing any large .s produced by clang for
example.
Fixes PR8596.
llvm-svn: 120603
2010-12-01 20:46:11 +00:00
Michael J. Spencer
b2cfb3b443
Fix Whitespace.
...
llvm-svn: 120166
2010-11-26 04:16:08 +00:00
Rafael Espindola
7c6bd9e0f9
Add a MCLineSectionOrder vector so that we produce the line tables in a
...
deterministic order.
llvm-svn: 119795
2010-11-19 07:41:23 +00:00
Rafael Espindola
00c5605efc
Parse and remember discriminators in .loc line. I try to output them with
...
another patch.
This lets us parse a bit more of the gcc 4.5 output.
llvm-svn: 118975
2010-11-13 03:18:27 +00:00
Rafael Espindola
8555d32c9e
Initial comdat implementation.
...
llvm-svn: 118805
2010-11-11 18:13:52 +00:00
Rafael Espindola
d05bf9ffe0
Use MCSectionELF in places we know we have an ELF section.
...
llvm-svn: 118699
2010-11-10 19:05:07 +00:00
Rafael Espindola
3c0f11a265
Fixed version of 118639 with an extra assert to catch similar problems
...
earlier. Implicit bool -> int conversions are evil!
llvm-svn: 118651
2010-11-09 23:42:07 +00:00
Rafael Espindola
a16ec0145e
Revert previous patch. Missed a case.
...
llvm-svn: 118645
2010-11-09 22:54:38 +00:00
Rafael Espindola
5e39a6d951
Remove IsExplicit. It was always false.
...
llvm-svn: 118639
2010-11-09 22:37:44 +00:00
Kevin Enderby
01b93a4319
Incorporate suggestions by Daniel Dunbar after his review. Thanks Daniel!
...
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
2010-10-04 20:17:24 +00:00
Kevin Enderby
f3d8ed8368
Did my commit for the last patch for the .loc directory from the wrong place and
...
missed a bunch of files. Here the rest. Sorry about that.
llvm-svn: 115173
2010-09-30 17:16:09 +00:00
Kevin Enderby
cc1c9257f6
This is the second of three patches to implement support for the .loc directive
...
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
2010-08-31 22:55:11 +00:00
Kevin Enderby
024b04ad93
First bit of support for the dwarf .loc directive. This patch updates the
...
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
2010-08-24 20:32:42 +00:00
Matt Fleming
68a31bf9c6
ELF entry size support.
...
Some ELF sections contain fixed-sized entries. Provide a way to record
the entry size of a section.
llvm-svn: 111169
2010-08-16 18:33:46 +00:00
Kevin Enderby
8303a64b0a
Next bit of support for the dwarf .file directive. This patch takes the
...
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
2010-08-09 22:52:14 +00:00
Benjamin Kramer
bf4f7b3665
Remove unused variable.
...
llvm-svn: 110551
2010-08-08 19:54:10 +00:00
Benjamin Kramer
85d8649a9c
Stop leaking std::strings in GetDwarfFile.
...
llvm-svn: 109746
2010-07-29 13:53:19 +00:00
Kevin Enderby
3f202e65e8
Added first bit of support for the dwarf .file directive. This patch collects
...
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
2010-07-28 20:55:35 +00:00
Kevin Enderby
aaad4f57f0
Added the darwin .secure_log_unique and .secure_log_reset directives.
...
llvm-svn: 107077
2010-06-28 21:45:58 +00:00
Kevin Enderby
14c986967b
Added support in MC for Directional Local Labels.
...
llvm-svn: 103989
2010-05-17 23:08:19 +00:00
Chris Lattner
e72e3e9c12
add COFF support for COMDAT sections, patch by Nathan Jeffords!
...
llvm-svn: 103304
2010-05-07 21:49:09 +00:00
Chris Lattner
c1d0e3a79e
switch MCSectionCOFF from a syntactic to semantic representation,
...
patch by Peter Housel!
llvm-svn: 103267
2010-05-07 17:17:41 +00:00
Chris Lattner
e154403f78
delete a forwarding function.
...
llvm-svn: 100815
2010-04-08 21:34:17 +00:00
Chris Lattner
1cf4bded13
move elf section uniquing to MCContext. Along the way
...
merge XCore's section into MCSectionELF
llvm-svn: 100812
2010-04-08 21:26:26 +00:00
Chris Lattner
0225dbbfee
remove the TargetLoweringObjectFileMachO::getMachoSection
...
api and update clients to use MCContext instead.
llvm-svn: 100808
2010-04-08 20:40:11 +00:00
Chris Lattner
60ff59e5c1
move macho section uniquing from MCParser and TLOF to MCContext where
...
the compiler and asmparser now unique to the same sections. This fixes
rdar://7835021.
llvm-svn: 100807
2010-04-08 20:30:37 +00:00
Chris Lattner
8e4cf6f425
Rip out the 'is temporary' nonsense from the MCContext interface to
...
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
2010-03-30 18:10:53 +00:00
Chris Lattner
962d3d700b
fix GetOrCreateTemporarySymbol to require a name, clients
...
should use CreateTempSymbol() if they don't care about the
name.
llvm-svn: 98712
2010-03-17 05:41:18 +00:00
Chris Lattner
1b10191d18
fix a memory leak yjasskin pointed out: MCSymbol is bump pointer
...
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
2010-03-15 06:15:35 +00:00
Chris Lattner
3eb55835b5
add a new CreateTempSymbol method, the use case for
...
CreateTempSymbol vs GetOrCreateTemporarySymbol are
completely different.
llvm-svn: 98486
2010-03-14 08:23:30 +00:00
Chris Lattner
956582f876
make the mangler take an MCContext instead of an MAI.
...
No functionality change.
llvm-svn: 98363
2010-03-12 18:44:54 +00:00
Chris Lattner
debc026df2
change MCContext to always have an MCAsmInfo.
...
llvm-svn: 98293
2010-03-11 22:53:35 +00:00
Chris Lattner
554f323da8
eliminate MCContext::CreateSymbol and CreateTemporarySymbol.
...
Add a new GetOrCreateTemporarySymbol method and a version that
takes a twine.
llvm-svn: 98118
2010-03-10 01:29:27 +00:00
Dan Gohman
835086ef52
Fix various doxygen warnings.
...
llvm-svn: 96779
2010-02-22 04:10:52 +00:00
Daniel Dunbar
4daaf9d3f4
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Chris Lattner
df848440d1
add a twine version of MCContext::GetOrCreateSymbol.
...
llvm-svn: 84561
2009-10-19 22:49:00 +00:00
Daniel Dunbar
6b7edc035b
MC: Move assembler variable values from MCContext to MCSymbol.
...
llvm-svn: 84229
2009-10-16 01:33:57 +00:00
Daniel Dunbar
c5165c4258
MC: Switch MCContext value table to storing MCExprs.
...
llvm-svn: 84228
2009-10-16 01:33:11 +00:00
Daniel Dunbar
fb42aebc4f
llvm-mc: Add some doxyment markers.
...
llvm-svn: 80568
2009-08-31 08:07:08 +00:00
Daniel Dunbar
1f70368155
llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
...
- 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
2009-08-26 22:13:22 +00:00
Daniel Dunbar
168f849552
llvm-mc: Change MCContext value table to take const MCSymbol*s.
...
llvm-svn: 80079
2009-08-26 09:16:57 +00:00
Chris Lattner
04f74d3510
sink uniquing of sections out of MCContext into the ELF and PECOFF TLOF implementations.
...
MCContext no longer maintains a string -> section map.
llvm-svn: 78874
2009-08-13 00:37:15 +00:00
Chris Lattner
7ead5b498b
add some comments: MCContext owns the MCSections, but it bump pointer allocates
...
them, so it doesn't have to explicitly free them.
llvm-svn: 78870
2009-08-13 00:21:53 +00:00