Chris Lattner
f0edf967c7
hookize the cygwin ".linkonce" directive.
...
llvm-svn: 93855
2010-01-19 05:08:13 +00:00
Chris Lattner
7351e3a364
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
...
llvm-svn: 93852
2010-01-19 04:48:20 +00:00
Chris Lattner
f904832189
hoist handling of external globals and special globals up to common code.
...
This makes a similar code dead in all the other targets, I'll clean it up
in a bit.
This also moves handling of lcomm up before acquisition of a section,
since lcomm never needs a section.
llvm-svn: 93851
2010-01-19 04:39:15 +00:00
Chris Lattner
3821a5f168
move production of .reference directives for static ctor/dtor list on
...
darwin into common code.
llvm-svn: 93849
2010-01-19 04:34:02 +00:00
Chris Lattner
b5e64bd377
use BSSLocal classifier to identify 'lcomm' data instead of
...
duplicating the logic (differently) in lots of different targets.
llvm-svn: 93847
2010-01-19 04:21:20 +00:00
Chris Lattner
63ef960b83
make TLOF subclassify BSS based on linkage type into private, external
...
and everything else (weak).
llvm-svn: 93846
2010-01-19 04:15:51 +00:00
Chris Lattner
77f12b9ee0
introduce a section kind for common linkage. Use this to slightly
...
simplify and commonize some of the asmprinter logic for globals.
This also avoids printing the MCSection for .zerofill, which broke
the llvm-gcc build.
llvm-svn: 93843
2010-01-19 02:48:26 +00:00
Chris Lattner
53d8210a69
change an accessor to a predicate.
...
llvm-svn: 93839
2010-01-19 02:13:06 +00:00
Chris Lattner
816fcd1287
Cleanup handling of .zerofill on darwin:
...
1. TargetLoweringObjectFileMachO should decide if something
goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
the right MCSection, the asmprinters should just emit to the
right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
MAI can have a bool "haszerofill" instead of having the textual
directive to emit.
llvm-svn: 93838
2010-01-19 02:09:44 +00:00
Chris Lattner
fa545150c4
remove extraneous ;
...
llvm-svn: 93833
2010-01-19 01:28:09 +00:00
Victor Hernandez
edcdd08463
Add comment that MDNode::getFunction() is not to be used by performance-critical code (currently only used by AsmWriter)
...
llvm-svn: 93802
2010-01-18 22:55:08 +00:00
Bill Wendling
58d26c105b
- Add getLSDAEncoding to the PowerPC backend.
...
- Greatly improve the comments to the getLSDAEncoding method.
llvm-svn: 93796
2010-01-18 22:36:35 +00:00
Sean Callanan
3439b1e14c
Added a newline at the end of SMLoc.h
...
llvm-svn: 93784
2010-01-18 22:16:54 +00:00
Sean Callanan
f6a09ee2ec
Changed the comment in the file header for SMLoc
...
to something more accurate.
llvm-svn: 93782
2010-01-18 22:11:34 +00:00
Sean Callanan
aef98cfcd2
Split SMLoc out in its own header so that it can
...
be used independently of SourceMgr.
llvm-svn: 93780
2010-01-18 22:07:51 +00:00
Victor Hernandez
afaac26fea
Make findDbgDeclare/findDbgGlobalDeclare local static functions; avoid Elts array
...
llvm-svn: 93764
2010-01-18 20:42:09 +00:00
Bill Wendling
5678a9711b
- Add a comment to the callback indicating that it's *extremely* not a good
...
idea, but unfortunately necessary.
- Default to using 4-bytes for the LSDA pointer encoding to agree with the
encoded value in the CIE.
llvm-svn: 93753
2010-01-18 19:36:27 +00:00
Benjamin Kramer
35bf21a0d2
Unnamed symbol index should be >= 1. This was lost during the mangler refactoring. Fixes PR6067.
...
llvm-svn: 93724
2010-01-18 14:39:20 +00:00
Chris Lattner
40f9b01ab5
switch x86 zerofill emission over to use MCStreamer.
...
llvm-svn: 93702
2010-01-18 01:21:08 +00:00
Chris Lattner
d7bd67fa61
Change CurrentFnSym to be a non-const pointer since asmprinter mutates it
...
as it emits code. Switch .globl directives to use OutStreamer instead of
doing it textually (in x86)
llvm-svn: 93700
2010-01-18 00:59:24 +00:00
Chris Lattner
86287085ba
remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
...
llvm-svn: 93699
2010-01-18 00:37:40 +00:00
Chris Lattner
6f360c3c91
now that MCSymbol::print doesn't use it's MAI argument, we can
...
remove it and change all the code that prints MCSymbols to use
<< instead, which is much simpler and cleaner.
llvm-svn: 93695
2010-01-17 21:43:43 +00:00
Chris Lattner
c2047ba3e4
stop the CBE from using Mangler::appendMangledName, which is a private function, it is mangling types, which don't matter how they are done.
...
llvm-svn: 93692
2010-01-17 19:32:29 +00:00
Chris Lattner
5607355614
fix uninit member, thanks to Benjamin Kramer for identifying the bug.
...
llvm-svn: 93691
2010-01-17 19:24:35 +00:00
Chris Lattner
f7c6508544
Get MCSymbol out of the mangling business, and move all the logic
...
to Mangler. Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.
This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.
llvm-svn: 93690
2010-01-17 19:23:46 +00:00
Chris Lattner
57ac0be2b5
now that mangler is in libtarget, it can use MCAsmInfo instead of clients
...
having to pass various fields from it in. Simplify.
llvm-svn: 93686
2010-01-17 18:22:35 +00:00
Benjamin Kramer
77e20e0bed
Switch some functions to take Twines, eliminate uses of StringExtras.h.
...
llvm-svn: 93680
2010-01-17 07:46:39 +00:00
Chris Lattner
51e8abe640
move the mangler into libtarget from vmcore.
...
llvm-svn: 93664
2010-01-16 21:57:06 +00:00
Chris Lattner
a0de152402
fix a warning.
...
llvm-svn: 93663
2010-01-16 21:55:24 +00:00
Chris Lattner
fbce331e2f
this doesn't need to suck in Mangler.
...
llvm-svn: 93662
2010-01-16 21:35:09 +00:00
Chris Lattner
6efe5156eb
reapply the mangler gutting patch.
...
llvm-svn: 93656
2010-01-16 21:08:46 +00:00
Rafael Espindola
d6c021a8d7
Revert 93648.
...
Mangler::getMangledName is used from lto
Mangler::setUseQuotes is used in the AsmPrinter
Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter
llvm-svn: 93652
2010-01-16 20:27:59 +00:00
Chris Lattner
16324d20f6
Mangler::getMangledName is now dead, remove it and all the other stuff in Mangler that is now transitively dead. woo.
...
llvm-svn: 93648
2010-01-16 19:08:51 +00:00
Chris Lattner
31aea3db21
rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,
...
and add an explicit ForcePrivate argument.
Switch FunctionEHFrameInfo to be MCSymbol based instead of string based.
llvm-svn: 93646
2010-01-16 18:37:32 +00:00
Chris Lattner
b8765fdca1
switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
...
llvm-svn: 93643
2010-01-16 18:12:14 +00:00
Chris Lattner
c88095b986
add an inefficient version of getNameWithPrefix that returns an std::string.
...
llvm-svn: 93641
2010-01-16 18:06:34 +00:00
Benjamin Kramer
92e94ed8c6
Revive dead assert.
...
llvm-svn: 93638
2010-01-16 16:14:55 +00:00
Tobias Grosser
24e0f1ed17
Fix PR6047
...
Nodes that had children outside of the post dominator tree (infinite loops)
where removed from the post dominator tree. This seems to be wrong. Leave them
in the tree.
llvm-svn: 93633
2010-01-16 13:38:07 +00:00
Tobias Grosser
4ce43821ee
Create Generic DOTGraphTraits Printer/Viewer
...
Move the DOTGraphTraits dotty printer/viewer templates, that were developed for
the dominance tree into their own header file. This will allow reuse in future
passes.
llvm-svn: 93632
2010-01-16 10:56:41 +00:00
Devang Patel
3bbca51dcd
Replace DebugLocTuple with DILocation.
...
llvm-svn: 93630
2010-01-16 06:09:35 +00:00
Bill Wendling
d78fcdd332
Retrying r91337:
...
The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE for some platforms. Allow
individual platforms to decide for themselves.
llvm-svn: 93616
2010-01-16 01:40:55 +00:00
Chris Lattner
61a95137c9
CurrentFnName is now dead, remove it.
...
llvm-svn: 93612
2010-01-16 01:24:10 +00:00
Chris Lattner
bb21a20f24
remove the string form of printVisibility.
...
llvm-svn: 93609
2010-01-16 01:17:26 +00:00
Bill Wendling
921cd93e85
Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
...
on the build bots.
llvm-svn: 93606
2010-01-16 01:06:58 +00:00
Chris Lattner
b1b91d11db
supplement CurrentFnName with CurrentFnSym, which will eventually
...
replace it. Upgrade Alpha, Blackfin, and part of CellSPU to not
use mangler anymore. CellSPU needs more invasive surgery.
llvm-svn: 93589
2010-01-15 23:55:16 +00:00
Chris Lattner
5f4c482b72
add a version of AsmPrinter::printVisibility that takes an MCSymbol.
...
llvm-svn: 93587
2010-01-15 23:38:51 +00:00
Ted Kremenek
bb1779e022
BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not initialization time. This removes one of the 'init_constructors' reported in <rdar://problem/7545356>.
...
llvm-svn: 93581
2010-01-15 23:29:34 +00:00
Dale Johannesen
654e79b05f
Remove unneeded argument per review.
...
llvm-svn: 93579
2010-01-15 23:28:49 +00:00
Chris Lattner
e293db0c8a
add another helper
...
llvm-svn: 93577
2010-01-15 23:25:11 +00:00
Chris Lattner
ea4d444561
add a AsmPrinter::GetGlobalValueSymbol and GetExternalSymbolSymbol
...
helper method, use it to simplify some code.
llvm-svn: 93575
2010-01-15 23:18:17 +00:00