summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/DarwinTargetAsmInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert 78892 and 78895, these break generating working executables onDaniel Dunbar2009-08-131-11/+7
| | | | | | | | | | | | | | | | | | | | | x86_64-apple-darwin10. --- Reverse-merging r78895 into '.': U test/CodeGen/PowerPC/2008-12-12-EH.ll U lib/Target/DarwinTargetAsmInfo.cpp --- Reverse-merging r78892 into '.': U include/llvm/Target/DarwinTargetAsmInfo.h U lib/Target/X86/X86TargetAsmInfo.cpp U lib/Target/X86/X86TargetAsmInfo.h U lib/Target/ARM/ARMTargetAsmInfo.h U lib/Target/ARM/ARMTargetMachine.cpp U lib/Target/ARM/ARMTargetAsmInfo.cpp U lib/Target/PowerPC/PPCTargetAsmInfo.cpp U lib/Target/PowerPC/PPCTargetAsmInfo.h U lib/Target/PowerPC/PPCTargetMachine.cpp G lib/Target/DarwinTargetAsmInfo.cpp llvm-svn: 78919
* fix typo, add 10.6 version of test for my previous patch.Chris Lattner2009-08-131-2/+2
| | | | llvm-svn: 78895
* fix a minor fixme. When building with SL and later tools, the ".eh" symbolsChris Lattner2009-08-131-7/+11
| | | | | | don't need to be exported from the .o files. llvm-svn: 78892
* Change the asmprinter to print the comment character before theChris Lattner2009-08-111-0/+2
| | | | | | | | | | "inlineasmstart/end" strings so that the contents of the directive are separate from the comment character. This lets elf targets get #APP/#NOAPP for free even if they don't use "#" as the comment character. This also allows hoisting the darwin stuff up to the shared TAI class. llvm-svn: 78737
* factorize more darwin TAI stuff. Note that this givesChris Lattner2009-08-111-0/+7
| | | | | | darwin/arm support for .no_dead_strip llvm-svn: 78734
* factorize darwin ProtectedDirective and SetDirective.Chris Lattner2009-08-111-0/+2
| | | | llvm-svn: 78732
* all darwin targets have .space and .zerofill, pull up.Chris Lattner2009-08-111-0/+2
| | | | llvm-svn: 78730
* move LCOMMDirective = "\t.lcomm\t" up to DarwinTAI, eliminateChris Lattner2009-08-111-1/+2
| | | | | | template in PPC backend for TAI. llvm-svn: 78727
* move dwarf debug info section selection stuff from TAI toChris Lattner2009-08-021-12/+0
| | | | | | TLOF, unifying all the dwarf targets at the same time. llvm-svn: 77889
* I need Triple information, 10.6 shouldn't set this, it bloats Chris Lattner2009-08-021-1/+2
| | | | | | object files. llvm-svn: 77887
* remove TargetAsmInfo::TM, which is now dead. The basic TAI class now Chris Lattner2009-08-021-13/+1
| | | | | | no longer depends on TM! llvm-svn: 77863
* convert ctors/dtors section to be in TLOF instead ofChris Lattner2009-08-021-9/+0
| | | | | | TAI. llvm-svn: 77842
* Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner2009-08-011-2/+0
| | | | | | | | | | | | compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. llvm-svn: 77833
* REmove dead fields of TAI.Chris Lattner2009-08-011-2/+0
| | | | llvm-svn: 77820
* move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it toChris Lattner2009-07-311-20/+0
| | | | | | | indicate that it is a predicate, not an emitter. This eliminates TAI dependencies on Mangler and GlobalValue. llvm-svn: 77726
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-102/+1
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* sink text/data section creation down into the target-specific places that Chris Lattner2009-07-271-1/+2
| | | | | | | should know about them. PECoff doesn't share these, and I want all sections to be created by object-file-specific code. llvm-svn: 77196
* 32-bit darwin targets support .literal16 too.Chris Lattner2009-07-271-6/+4
| | | | llvm-svn: 77191
* Eliminate getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-271-17/+17
| | | | | | | | getOrCreateSection instead. llvm-svn: 77186
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-9/+10
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* simplify this code now that SectionKind knows if a global is weak or not.Chris Lattner2009-07-261-5/+2
| | | | llvm-svn: 77141
* rename Mergable -> Mergeable and Writable -> WriteableChris Lattner2009-07-261-10/+10
| | | | llvm-svn: 77138
* simplify getSectionForMergableConstant to take a SectionKind.Chris Lattner2009-07-261-13/+6
| | | | llvm-svn: 77134
* introduce specialized mergable const sectionkinds for elements of size 4/8/16 toChris Lattner2009-07-261-3/+7
| | | | | | simplify targets. llvm-svn: 77132
* Rearrange all the SectionKinds and structure them into a hierarchicalChris Lattner2009-07-261-9/+9
| | | | | | | | | | | | | group instead of a bunch of random unrelated ideas. Provide predicates to categorize a SectionKind into a group, and use them instead of getKind() throughout the code. This also renames a ton of SectionKinds to be more consistent and evocative, and adds a huge number of comments on the enums so that I will hopefully be able to remember how this stuff works long from now. llvm-svn: 77129
* finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobalChris Lattner2009-07-261-23/+16
| | | | | | | for now. Make the section switching directives more consistent by not including \n and including \t for them all. llvm-svn: 77107
* simplify DarwinTargetAsmInfo::SelectSectionForGlobal a bitChris Lattner2009-07-261-16/+20
| | | | | | | | | | | and make it more aggressive, we now put: const int G2 __attribute__((weak)) = 42; into the text (readonly) segment like gcc, previously we put it into the data (readwrite) segment. llvm-svn: 77104
* make SectionKind be a first-class pod struct instead of justChris Lattner2009-07-251-2/+2
| | | | | | an enum. llvm-svn: 77096
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-1/+2
| | | | | | | | | | | | | | 1. Spell SectionFlags::Writeable as "Writable". 2. Add predicates for deriving SectionFlags from SectionKinds. 3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into ELFTargetAsmInfo. 4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the BSS bit set (the real fix for PR4619). 5. Fix isSuitableForBSS to not put globals with explicit sections set in BSS (which was the reason #4 wasn't fixed earlier). 6. Remove my previous hack for PR4619. llvm-svn: 77085
* make SectionKindForGlobal target independent, and therefore non-virtual.Chris Lattner2009-07-241-2/+7
| | | | | | | | It's classifications now include elf-specific discriminators. Targets that don't have these features (like darwin and pecoff) simply treat data.rel like data, etc. llvm-svn: 76993
* we already know the sectionkind when invoking SelectSectionForGlobal,Chris Lattner2009-07-241-2/+2
| | | | | | pass it in instead of recomputing it. llvm-svn: 76990
* hoist section name uniquing logic up to the top-level SectionForGlobalChris Lattner2009-07-241-5/+4
| | | | | | implementation, eliminating a dupe. llvm-svn: 76953
* Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.Chris Lattner2009-07-241-6/+0
| | | | | | | | The later doesn't depend on any crazy LLVM IR stuff, and this pulls the concatenation of prefix with GV name (the root problem behind PR4584) out one level. llvm-svn: 76948
* inline the two MergeableConstSection implementations into theirChris Lattner2009-07-221-17/+13
| | | | | | only caller. llvm-svn: 76710
* remove the SelectSectionForMachineConst hook, replacing it withChris Lattner2009-07-221-20/+22
| | | | | | | | a new getSectionForMergableConstant hook. This removes one dependence of TAI on Type, and provides the hook with enough info to make the right decision based on whether the global has relocations etc. llvm-svn: 76705
* simplify based on the fact that darwin always uses L/l.Chris Lattner2009-07-211-8/+4
| | | | llvm-svn: 76662
* make some stuff private.Chris Lattner2009-07-211-10/+3
| | | | llvm-svn: 76661
* Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match theChris Lattner2009-07-211-4/+5
| | | | | | LLVM IR concept. llvm-svn: 76590
* Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that ↵Bill Wendling2009-07-201-16/+16
| | | | | | humans can understand it. llvm-svn: 76480
* Untangle a snarl that I discovered when updating the mangler,Chris Lattner2009-07-171-0/+5
| | | | | | | | | | | | | | starting in getCurrentFunctionEHName. Among other problems, we would try to privative a "foo.eh" label, but end up emitting the label as _Lfoo.eh instead of L_foo.eh on darwin. This is really bad, and the linker has always tolerated these labels existing. For now, just emit them as _foo.eh. This patch also fixes problems with ".eh" labels on unnamed functions and eliminates two strangely defined TargetAsmInfo hooks. llvm-svn: 76231
* Remove StringConstantPrefix now that the only userDuncan Sands2009-07-151-1/+0
| | | | | | (llvm-gcc) has gone. llvm-svn: 75781
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-3/+6
| | | | | | | | | | | | | | | | | | | | additional bug fixes: 1. The bug that everyone hit was a problem in the asmprinter where it would remove $stub but keep the L prefix on a name when emitting the indirect symbol. This is easy to fix by keeping the name of the stub and the name of the symbol in a StringMap instead of just keeping a StringSet and trying to reconstruct it late. 2. There was a problem printing the personality function. The current logic to print out the personality function from the DWARF information is a bit of a cesspool right now that duplicates a bunch of other logic in the asm printer. The short version of it is that it depends on emitting both the L and _ prefix for symbols (at least on darwin) and until I can untangle it, it is best to switch the mangler back to emitting both prefixes. llvm-svn: 75646
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Revert r7561{9,8,7,6}, which depend on r75610. Daniel Dunbar2009-07-141-6/+3
| | | | | | | | | | | | | | | | | | --- Reverse-merging r75619 into '.': U lib/Target/DarwinTargetAsmInfo.cpp U lib/CodeGen/AsmPrinter/AsmPrinter.cpp --- Reverse-merging r75618 into '.': U lib/CodeGen/ELFWriter.cpp U lib/CodeGen/MachOCodeEmitter.cpp U lib/CodeGen/MachOWriter.cpp --- Reverse-merging r75617 into '.': U lib/Target/CBackend/CBackend.cpp --- Reverse-merging r75616 into '.': U tools/bugpoint/Miscompilation.cpp U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp llvm-svn: 75638
* rename getValueName -> getMangledName. These two files have veryChris Lattner2009-07-141-3/+6
| | | | | | dubious looking things that I need to investigate in more detail. llvm-svn: 75619
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+3
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* merge the common darwin settings from the X86/PPC/ARM targetsChris Lattner2009-06-191-0/+47
| | | | | | | | into DarwinTargetAsmInfo.cpp. The remaining differences should be evaluated. It seems strange that x86/arm has .zerofill but ppc doesn't, etc. llvm-svn: 73742
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-2/+2
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Do not propagate ELF-specific stuff (data.rel) into other targets. This ↵Anton Korobeynikov2009-03-301-3/+0
| | | | | | simplifies code and also ensures correctness. llvm-svn: 68032
* Add data.rel stuffAnton Korobeynikov2009-03-301-0/+3
| | | | llvm-svn: 68031
OpenPOWER on IntegriCloud