summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachOWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Kill the Mach-O writer, and temporarily make filetype=obj an error.Nate Begeman2010-02-011-125/+0
| | | | | | The MCStreamer based assemblers will take over for this functionality. llvm-svn: 95033
* Add a note for the macho streamer and remove a used of the mangler from the ↵Nate Begeman2010-01-171-6/+0
| | | | | | soon to be defunct machowriter pass. llvm-svn: 93670
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-161-1/+1
| | | | llvm-svn: 93664
* reapply the mangler gutting patch.Chris Lattner2010-01-161-6/+0
| | | | llvm-svn: 93656
* Revert 93648.Rafael Espindola2010-01-161-0/+6
| | | | | | | | Mangler::getMangledName is used from lto Mangler::setUseQuotes is used in the AsmPrinter Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter llvm-svn: 93652
* Mangler::getMangledName is now dead, remove it and all the other stuff in ↵Chris Lattner2010-01-161-6/+0
| | | | | | Mangler that is now transitively dead. woo. llvm-svn: 93648
* Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.Nate Begeman2010-01-151-717/+76
| | | | | | | | | Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer Further refactoring to completely remove MachOWriter and drive the object file writer with the AsmPrinter MCInst/MCSection logic is forthcoming. llvm-svn: 93527
* Change errs() to dbgs().David Greene2010-01-041-2/+3
| | | | llvm-svn: 92539
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-2/+2
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-221-9/+9
| | | | llvm-svn: 79777
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-3/+3
| | | | llvm-svn: 79763
* Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match theChris Lattner2009-07-211-1/+2
| | | | | | LLVM IR concept. llvm-svn: 76590
* Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that ↵Bill Wendling2009-07-201-1/+0
| | | | | | humans can understand it. llvm-svn: 76480
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-0/+3
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Reapply my previous asmprinter changes now with more testing and two Chris Lattner2009-07-141-3/+3
| | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | | 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-3/+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 -> getMangledNameChris Lattner2009-07-141-3/+3
| | | | llvm-svn: 75618
* As Chris pointed out, this doesn't actually need an LLVMContext to operate.Owen Anderson2009-07-131-1/+1
| | | | llvm-svn: 75508
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-1/+1
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-3/+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
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-5/+7
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Cleanup MachO writer and code emitter. Fix 80 cols problems, remove extra ↵Bruno Cardoso Lopes2009-07-061-51/+129
| | | | | | spaces, shrink down includes and move some methods out-of-line llvm-svn: 74817
* Add the Object Code Emitter class. Original patch by Aaron Gray, I did someBruno Cardoso Lopes2009-07-061-85/+68
| | | | | | cleanup, removed some #includes and moved Object Code Emitter out-of-line. llvm-svn: 74813
* Move structures and classes into header files, providing two new headers andBruno Cardoso Lopes2009-06-031-387/+122
| | | | | | | | one new .cpp file, in preparation for merging in the Direct Object Emission changes we're working on. No functional changes. Fixed coding style issues on the original patch. Patch by Aaron Gray llvm-svn: 72754
* Use uint8_t and int32_t in {JIT,Machine}CodeEmitersBruno Cardoso Lopes2009-05-301-1/+1
| | | | llvm-svn: 72650
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-6/+6
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-2/+1
| | | | | | linkage, so remove it. llvm-svn: 66690
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-3/+6
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Add support to the JIT for true non-lazy operation. When a call to a functionNate Begeman2009-02-181-0/+5
| | | | | | | | | | | | | | | | | | | | that has not been JIT'd yet, the callee is put on a list of pending functions to JIT. The call is directed through a stub, which is updated with the address of the function after it has been JIT'd. A new interface for allocating and updating empty stubs is provided. Add support for removing the ModuleProvider the JIT was created with, which would otherwise invalidate the JIT's PassManager, which is initialized with the ModuleProvider's Module. Add support under a new ExecutionEngine flag for emitting the infomration necessary to update Function and GlobalVariable stubs after JITing them, by recording the address of the stub and the name of the GlobalValue. This allows code to be copied from one address space to another, where libraries may live at different virtual addresses, and have the stubs updated with their new correct target addresses. llvm-svn: 64906
* Add the private linkage.Rafael Espindola2009-01-151-1/+4
| | | | llvm-svn: 62279
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-6/+6
| | | | | | suggested by Chris. llvm-svn: 62099
* Fix some release-assert warningsChris Lattner2008-12-191-4/+4
| | | | llvm-svn: 61244
* Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids ↵Evan Cheng2008-12-101-7/+7
| | | | | | some overflow issues. Patch by Thomas Jablin. llvm-svn: 60828
* Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ↵Evan Cheng2008-11-081-3/+3
| | | | | | ptr. llvm-svn: 58897
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-091-2/+2
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-211-2/+3
| | | | llvm-svn: 55092
* Use isSingleValueType instead of isFirstClassType toDan Gohman2008-05-231-1/+1
| | | | | | exclude struct and array types. llvm-svn: 51459
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-1/+3
| | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
* Correlate stubs with functions in JIT: when emitting a stub, the JIT tells ↵Nicolas Geoffray2008-04-161-2/+3
| | | | | | | | the memory manager which function the stub will resolve. llvm-svn: 49814
* Use PassManagerBase instead of FunctionPassManager for functionsDan Gohman2008-03-111-2/+2
| | | | | | | | that merely add passes. This allows them to be used with either FunctionPassManager or PassManager, or even with a custom new kind of pass manager. llvm-svn: 48256
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-0/+1
| | | | | | annoying warnings. llvm-svn: 47367
* Enable exception handling int JITNicolas Geoffray2008-02-131-0/+14
| | | | llvm-svn: 47079
* Use getPreferredAlignmentLog or getPreferredAlignmentDuncan Sands2008-01-291-4/+2
| | | | | | | to get the alignment of global variables, rather than using hand-made versions. llvm-svn: 46495
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Eliminate the remaining uses of getTypeSize. ThisDuncan Sands2007-11-051-6/+8
| | | | | | | | | | | | | | should only effect x86 when using long double. Now 12/16 bytes are output for long double globals (the exact amount depends on the alignment). This brings globals in line with the rest of LLVM: the space reserved for an object is now always the ABI size. One tricky point is that only 10 bytes should be output for long double if it is a field in a packed struct, which is the reason for the additional argument to EmitGlobalConstant. llvm-svn: 43688
* Revise previous patch per review comments.Dale Johannesen2007-09-121-4/+4
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-111-4/+4
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Next round of APFloat changes.Dale Johannesen2007-09-061-2/+4
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
OpenPOWER on IntegriCloud