summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add back r201608, r201622, r201624 and r201625Rafael Espindola2014-02-191-1/+2
| | | | | | | | | | | | | | r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing. They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually. llvm-svn: 201700
* Revert r201622 and r201608.Daniel Jasper2014-02-191-2/+1
| | | | | | | This causes the LLVMgold plugin to segfault. More information on the replies to r201608. llvm-svn: 201669
* Fix PR18743.Rafael Espindola2014-02-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The IR @foo = private constant i32 42 is valid, but before this patch we would produce an invalid MachO from it. It was invalid because it would use an L label in a section where the liker needs the labels in order to atomize it. One way of fixing it would be to just reject this IR in the backend, but that would not be very front end friendly. What this patch does is use an 'l' prefix in sections that we know the linker requires symbols for atomizing them. This allows frontends to just use private and not worry about which sections they go to or how the linker handles them. One small issue with this strategy is that now a symbol name depends on the section, which is not available before codegen. This is not a problem in practice. The reason is that it only happens with private linkage, which will be ignored by the non codegen users (llvm-nm and llvm-ar). llvm-svn: 201608
* Pass the Mangler by reference.Rafael Espindola2014-02-081-1/+1
| | | | | | | It is never null and it is not used in casts, so there is no reason to use a pointer. This matches how we pass TM. llvm-svn: 201025
* MC: Add support for .cfi_startproc simpleDavid Majnemer2014-01-271-1/+1
| | | | | | | | | | | | | This commit allows LLVM MC to process .cfi_startproc directives when they are followed by an additional `simple' identifier. This signals to elide the emission of target specific CFI instructions that would normally occur initially. This fixes PR16587. Differential Revision: http://llvm-reviews.chandlerc.com/D2624 llvm-svn: 200227
* Move the llvm mangler to lib/IR.Rafael Espindola2014-01-071-1/+1
| | | | | | This makes it available to tools that don't link with target (like llvm-ar). llvm-svn: 198708
* Reland 196270 "Generalize debug info / EH emission in AsmPrinter"Timur Iskhodzhanov2013-12-031-1/+1
| | | | | | Addressing the existense AMDGPUAsmPrinter and other subclasses of AsmPrinter llvm-svn: 196288
* Rename DwarfException methods so the new names are consistent with ↵Timur Iskhodzhanov2013-11-261-6/+6
| | | | | | DwarfDebug and the style guide llvm-svn: 195763
* Add a helper getSymbol to AsmPrinter.Rafael Espindola2013-10-291-1/+1
| | | | llvm-svn: 193627
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* This patch is needed to make c++ exceptions work for mips16.Reed Kotler2012-12-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mips16 is really a processor decoding mode (ala thumb 1) and in the same program, mips16 and mips32 functions can exist and can call each other. If a jal type instruction encounters an address with the lower bit set, then the processor switches to mips16 mode (if it is not already in it). If the lower bit is not set, then it switches to mips32 mode. The linker knows which functions are mips16 and which are mips32. When relocation is performed on code labels, this lower order bit is set if the code label is a mips16 code label. In general this works just fine, however when creating exception handling tables and dwarf, there are cases where you don't want this lower order bit added in. This has been traditionally distinguished in gas assembly source by using a different syntax for the label. lab1: ; this will cause the lower order bit to be added lab2=. ; this will not cause the lower order bit to be added In some cases, it does not matter because in dwarf and debug tables the difference of two labels is used and in that case the lower order bits subtract each other out. To fix this, I have added to mcstreamer the notion of a debuglabel. The default is for label and debug label to be the same. So calling EmitLabel and EmitDebugLabel produce the same result. For various reasons, there is only one set of labels that needs to be modified for the mips exceptions to work. These are the "$eh_func_beginXXX" labels. Mips overrides the debug label suffix from ":" to "=." . This initial patch fixes exceptions. More changes most likely will be needed to DwarfCFException to make all of this work for actual debugging. These changes will be to emit debug labels in some places where a simple label is emitted now. Some historical discussion on this from gcc can be found at: http://gcc.gnu.org/ml/gcc-patches/2008-08/msg00623.html http://gcc.gnu.org/ml/gcc-patches/2008-11/msg01273.html llvm-svn: 170279
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-10/+10
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Move TargetData to DataLayout.Micah Villmow2012-10-081-1/+1
| | | | llvm-svn: 165402
* Add 148175 back. I am unable to reproduce any non determinism in a dragoneggRafael Espindola2012-01-171-2/+4
| | | | | | | | | | | or clang bootstrap. I will keep an eye on the bots. Original message: Only emit the Leh_func_endN symbol when needed. llvm-svn: 148283
* Speculatively revert commit 148175 (rafael), to see if this fixesDuncan Sands2012-01-141-4/+2
| | | | | | | | non-determinism in the 32 bit dragonegg buildbot. Original commit message: Only emit the Leh_func_endN symbol when needed. llvm-svn: 148191
* Only emit the Leh_func_endN symbol when needed.Rafael Espindola2012-01-141-2/+4
| | | | llvm-svn: 148175
* Remove previous commit while I debug the bot failures.Rafael Espindola2012-01-131-0/+3
| | | | llvm-svn: 148156
* Remove label that is not used anymore.Rafael Espindola2012-01-131-3/+0
| | | | llvm-svn: 148150
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-201-1/+2
| | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! llvm-svn: 135569
* Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions forEvan Cheng2011-07-181-1/+1
| | | | | | better location welcome). llvm-svn: 135438
* Initialize moveTypeModule.Rafael Espindola2011-05-101-2/+2
| | | | llvm-svn: 131157
* Use .cfi_sections to put the unwind info in .debug_frame when possible. WithRafael Espindola2011-05-101-1/+10
| | | | | | | | | this clang will use .debug_frame in, for example, clang -g -c -m32 test.c This matches gcc's behaviour. It looks like .debug_frame is a bit bigger than .eh_frame, but has the big advantage of not being allocated. llvm-svn: 131140
* Only produce the eh_frame section if we have at least one personality function.Rafael Espindola2011-05-021-7/+9
| | | | llvm-svn: 130692
* The last hack for producing bit identical output with cfi on OS X.Rafael Espindola2011-04-291-0/+8
| | | | llvm-svn: 130504
* Change DwarfCFIException's member variables to track what it actuallyRafael Espindola2011-04-291-28/+31
| | | | | | emmits: .cfi_personality, .cfi_lsda and the moves. llvm-svn: 130503
* Factor some code to needsCFIMoves. Avoid printing moves when we don't have to.Rafael Espindola2011-04-291-2/+1
| | | | llvm-svn: 130501
* Remove unnecessary argument.Rafael Espindola2011-04-271-2/+1
| | | | llvm-svn: 130343
* Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, andRafael Espindola2011-04-271-11/+2
| | | | | | | | | | | | | | | | | | give it a bit more responsibility. Also implement it for MachO. If hacked to use cfi, 32 bit MachO will produce .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr and 64 bit will produce .cfi_presonality ___gxx_personality_v0 The general idea is that .cfi_personality gets passed the final symbol. It is up to codegen to produce it if using indirect representation (like 32 bit MachO), but it is up to MC to decide which relocations to create. llvm-svn: 130341
* Simplify the logic. Noticed by aKor.Rafael Espindola2011-04-241-2/+1
| | | | llvm-svn: 130116
* Synchronize the conditions for producing a .cfi_startproc and a .cfi_endproc.Rafael Espindola2011-04-241-1/+1
| | | | | | Fixes PR9787. llvm-svn: 130115
* Remove unused variable.Benjamin Kramer2011-04-161-5/+2
| | | | llvm-svn: 129639
* Put each personality function in a section. This fixes the gnu ld warning:Rafael Espindola2011-04-161-8/+3
| | | | | | error in foo.o; no .eh_frame_hdr table will be created. llvm-svn: 129635
* Add 129518 back with a fix for when we are producing eh just because of ↵Rafael Espindola2011-04-151-16/+28
| | | | | | | | | debug info. Change ELF systems to use CFI for producing the EH tables. This reduces the size of the clang binary in Debug builds from 690MB to 679MB. llvm-svn: 129571
* Revert r129518, "Change ELF systems to use CFI for producing the EH tables. ↵NAKAMURA Takumi2011-04-151-27/+15
| | | | | | | | This reduces the" It broke several builds. llvm-svn: 129557
* Change ELF systems to use CFI for producing the EH tables. This reduces theRafael Espindola2011-04-141-15/+27
| | | | | | size of the clang binary in Debug builds from 690MB to 679MB. llvm-svn: 129518
* Add a possibility to switch between CFI directives- and table-based frame ↵Anton Korobeynikov2011-01-141-1/+1
| | | | | | description emission. Currently all the backends use table-based stuff. llvm-svn: 123476
* Add CFI directives-based frame information emission. Not hooked yet.Anton Korobeynikov2011-01-141-0/+138
llvm-svn: 123474
OpenPOWER on IntegriCloud