summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* now that MCSymbol::print doesn't use it's MAI argument, we can Chris Lattner2010-01-171-28/+12
| | | | | | | remove it and change all the code that prints MCSymbols to use << instead, which is much simpler and cleaner. llvm-svn: 93695
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-161-1/+1
| | | | llvm-svn: 93664
* rename GetPrivateGlobalValueSymbolStub -> GetSymbolWithGlobalValueBase,Chris Lattner2010-01-161-17/+35
| | | | | | | | and add an explicit ForcePrivate argument. Switch FunctionEHFrameInfo to be MCSymbol based instead of string based. llvm-svn: 93646
* Retrying r91337:Bill Wendling2010-01-161-8/+19
| | | | | | | | 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
* move these out of their own timer groups into the 'uncategorized' groups.Chris Lattner2009-12-281-7/+1
| | | | llvm-svn: 92206
* Temporarily revert 91337. It's causing testcase failures.Bill Wendling2009-12-171-6/+7
| | | | | | | | $ svn merge -c -91337 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r91337 into '.': U lib/CodeGen/AsmPrinter/DwarfException.cpp llvm-svn: 91618
* The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,Bill Wendling2009-12-141-7/+6
| | | | | | but we need it to actually be 4-bytes in the FDE. llvm-svn: 91337
* Reverting the EH table patches.Bill Wendling2009-11-191-29/+6
| | | | | | | | | | | | | $ svn merge -c -89279 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r89279 into '.': U lib/CodeGen/AsmPrinter/DwarfException.cpp U lib/Target/TargetLoweringObjectFile.cpp $ svn merge -c -89270 https://llvm.org/svn/llvm-project/llvm/trunk --- Reverse-merging r89270 into '.': G lib/CodeGen/AsmPrinter/DwarfException.cpp G lib/Target/TargetLoweringObjectFile.cpp llvm-svn: 89379
* The "ReadOnlyWithRel" enum seems to apply more to what Darwin does with the EHBill Wendling2009-11-191-4/+5
| | | | | | exception table than DataRel. llvm-svn: 89279
* Attempt #2:Bill Wendling2009-11-181-6/+28
| | | | | | Place the EH table in the __TEXT section on MachO. It saves space. llvm-svn: 89270
* Refactor the code that creates the "dot-label" difference. This may be used inBill Wendling2009-11-171-18/+23
| | | | | | more than one place. No intended functionality change. llvm-svn: 89024
* Simplify code a bitBill Wendling2009-11-121-4/+3
| | | | llvm-svn: 87040
* Refactor code that checks if it's a call to a "nounwind" function.Bill Wendling2009-11-121-31/+36
| | | | llvm-svn: 87036
* If there's more than one function operand to a call instruction, be conservativeBill Wendling2009-11-121-1/+12
| | | | | | | | | and don't assume that the call doesn't throw. It would be nice if there were a way to determine which is the callee and which is a parameter. In practice, the architecture we care about normally only have one operand for a call instruction (x86 and arm). llvm-svn: 87023
* Don't mark a call as potentially throwing if the function it's calling has theBill Wendling2009-11-111-1/+21
| | | | | | "nounwind" attribute. llvm-svn: 86897
* Make sure that the exception handling data has the same visibility as theBill Wendling2009-11-111-2/+7
| | | | | | function it's generated for. llvm-svn: 86779
* Fix DenseMap iterator constness.Jeffrey Yasskin2009-11-101-1/+1
| | | | | | | | | | | | | | | | | | | This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! llvm-svn: 86636
* Tidying up some code and comments. No functionality change.Bill Wendling2009-10-221-24/+6
| | | | llvm-svn: 84894
* --- Reverse-merging r82282 into '.':Bill Wendling2009-09-201-47/+22
| | | | | | | | | | | | | U lib/CodeGen/AsmPrinter/DwarfException.cpp U lib/CodeGen/AsmPrinter/DwarfException.h --- Reverse-merging r82274 into '.': U lib/Target/TargetLoweringObjectFile.cpp G lib/CodeGen/AsmPrinter/DwarfException.cpp These revisions were breaking everything. llvm-svn: 82396
* Here's fun! It turns out that these filter functions can be internal. If they'reBill Wendling2009-09-201-1/+2
| | | | | | | | internal, they shouldn't use the indirect pointer stuff. In the case of throw_rethrow_test, it was marked as 'internal' and calculated its own offset to its contents. llvm-svn: 82354
* Factor out label difference creation.Bill Wendling2009-09-181-35/+24
| | | | llvm-svn: 82282
* It's inefficient to have place the exception tables (which contain the LSDA)Bill Wendling2009-09-181-5/+40
| | | | | | | | | into the __DATA section. At launch time, dyld has to update most of the section to fix up the type info pointers. It's better to place it into the __TEXT section and use pc-rel indirect pointer encodings. Similar to the personality routine. llvm-svn: 82274
* pass machinemoduleinfo down into getSymbolForDwarfGlobalReference, Chris Lattner2009-09-171-0/+1
| | | | | | currently unused. llvm-svn: 82157
* Big change #1 for personality function references:Chris Lattner2009-09-161-19/+45
| | | | | | | | | | | | | | | | | | | | | | | | Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding fields from MAI: they aren't part of the asm syntax, they are related to the structure of the object file. To replace their functionality, add a new TLOF::getSymbolForDwarfGlobalReference method which asks targets to decide how to reference a global from EH in a pc-relative way. The default implementation just returns the symbol. The default darwin implementation references the symbol through an indirect $non_lazy_ptr stub. The bizarro x86-64 darwin specialization handles the weird "foo@GOTPCREL+4" hack. DwarfException.cpp now uses this to emit the reference to the symbol in the right way, and this also eliminates another horrible hack from DwarfException.cpp: - if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL")) - O << "-" << MAI->getPCSymbol(); llvm-svn: 81991
* inline AsmPrinter::getCurrentFunctionEHName into its only caller.Chris Lattner2009-09-161-2/+5
| | | | llvm-svn: 81970
* Eliminate AsmPrinter::EmitExternalGlobal, inlining its (now)Chris Lattner2009-09-161-1/+1
| | | | | | | | one implementation into its one caller. This eliminates a totally awesome and gratuitous hack where we casted a Function* to GlobalVariable*. llvm-svn: 81967
* eliminate the horrid AsmPrinter::getGlobalLinkName method, inliningChris Lattner2009-09-161-2/+1
| | | | | | it into all of its call sites and simplifying them. llvm-svn: 81962
* strength reduce a call to PrintRelDirective(true).Chris Lattner2009-09-151-1/+3
| | | | llvm-svn: 81942
* Exit early if exception handling isn't supported.Bill Wendling2009-09-101-13/+13
| | | | llvm-svn: 81454
* Comment and whitespace cleanups. No intentional functionality change.Bill Wendling2009-09-101-27/+21
| | | | llvm-svn: 81436
* Revert part of my r81424 patch. I removed what looked like superfluous paddingBill Wendling2009-09-101-23/+37
| | | | | | | | from the exception tables. However, Duncan explained why it's a can of worms to do it the GCC way. I went back to doing it the LLVM way and added Duncan's explanation so that I don't do this again in the future. llvm-svn: 81434
* Don't hardcode the TType format size. In fact, rework the code so that it's moreBill Wendling2009-09-101-49/+49
| | | | | | | | like what GCC outputs. The mysterious code to insert padding wasn't in GCC at all. I modified the TType base offset code to calculate the offset like GCC does, though. llvm-svn: 81424
* Remove the "#if 0" that Noone loved. It wasn't really necessary, because theBill Wendling2009-09-101-27/+20
| | | | | | | | code within it was the same inside and out. There's still a problem of the TypeInfoSize should be the size of the TType format encoding (at least that's what GCC thinks it should be). llvm-svn: 81417
* Pull check for SJLJ EH into a boolean and use that.Bill Wendling2009-09-101-7/+10
| | | | llvm-svn: 81409
* Use the SizeOfEncodedValue function instead of magic variables for theBill Wendling2009-09-101-4/+3
| | | | | | sizeof(DW_EH_PE_udata4). llvm-svn: 81408
* Add helpful comment.Bill Wendling2009-09-101-0/+1
| | | | llvm-svn: 81406
* Believe it or not, this is a simplification. :-)Bill Wendling2009-09-091-37/+79
| | | | | | | | | | | | | Basically, this patch is working towards removing the hard-coded values that are output for the CIE. In particular, the CIE augmentation and the CIE augmentation size. Both of these should be calculated. In the process, I was able to make a bunch of code simpler. The encodings for the personality, LSDA, and FDE in the CIE are still not correct. They should be generated either from target-specific callbacks (blech!) or grokked from first-principles. llvm-svn: 81404
* Use the EOL that takes the encoding and translates it into DWARF-English.Bill Wendling2009-09-091-11/+13
| | | | llvm-svn: 81382
* Early exit from function.Bill Wendling2009-09-091-14/+13
| | | | llvm-svn: 81381
* Small amount of code clean-up: Don't use ".size()" when not necessary.Bill Wendling2009-09-091-5/+7
| | | | llvm-svn: 81380
* reduce size of SmallString to something more reasonableJim Grosbach2009-09-011-1/+1
| | | | llvm-svn: 80710
* Use raw_ostream instead of sstreamJim Grosbach2009-09-011-7/+5
| | | | llvm-svn: 80704
* revert inadvertant change from previous commitJim Grosbach2009-09-011-2/+3
| | | | llvm-svn: 80689
* Simply LSDA lable emission to use a direct special-case output instead ofJim Grosbach2009-09-011-4/+3
| | | | | | EmitLabel() llvm-svn: 80677
* Clean up LSDA name generation and use for SJLJ exception handling. ThisJim Grosbach2009-09-011-3/+8
| | | | | | | | | | | makes an eggregious hack somewhat more palatable. Bringing the LSDA forward and making it a GV available for reference would be even better, but is beyond the scope of what I'm looking to solve at this point. Objective C++ code could generate function names that broke the previous scheme. This fixes that. llvm-svn: 80649
* Output a hex value, because all of the others are hex.Bill Wendling2009-08-311-1/+1
| | | | llvm-svn: 80601
* Revert commit 80428. It completely broke exceptionDuncan Sands2009-08-311-30/+17
| | | | | | handling on x86-32 linux. llvm-svn: 80592
* PR4747Jim Grosbach2009-08-311-2/+3
| | | | | | | | | | | | | Shared landing pads run into trouble with SJLJ, as the dispatch table is mapped to call sites, and merging the pads will throw that off. There needs to be a one-to-one mapping of landing pad exception table entries to invoke call points. Detecting the shared pad during lowering of SJLJ info insn't sufficient, as the dispatch function may still need separate destinations to properly handle phi-nodes. llvm-svn: 80530
* - Add target lowering methods to get the preferred format for the FDE and LSDABill Wendling2009-08-291-17/+30
| | | | | | | | | encodings. - Make some of the values emitted by the FDEs dependent upon the pointer size. This is in line with how GCC does things. And it has the benefit of working for Darwin in 64-bit mode now. llvm-svn: 80428
* Make the augmentation size and next set of bytes agree on size,Eric Christopher2009-08-291-4/+10
| | | | | | | | | and make the reference pointer size as it should be. Fixes an abort on a testcase derived from libunwind's personality test in 64-bit. llvm-svn: 80414
OpenPOWER on IntegriCloud