llvm-6502/lib
Manman Ren 3eabc2adb7 Debug Info: support for DW_FORM_ref_addr.
To support ref_addr, we calculate the section offset of a DIE (i.e. offset
of a DIE from beginning of the debug info section). The Offset field in DIE
is currently CU-relative. To calculate the section offset, we add a
DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
for each CompileUnit.

A helper function DIE::getCompileUnit is added to return the CU DIE that
the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
finding the CU for a given CU DIE.

For a cross-referenced DIE, we first find the CU DIE it belongs to with
getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
Adding the section offset of the CU with the CU-relative offset of a DIE gives
us the seciton offset of the DIE.

We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
doesDwarfUseRelocationsAcrossSections is true.

This commit handles the emission of DW_FORM_ref_addr when we have an attribute
with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
DIEEntry. This commit will be tested and verified in the follow-on patch.

Reviewed off-list by Eric, Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193658 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 22:57:10 +00:00
..
Analysis SCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive. 2013-10-28 07:30:06 +00:00
AsmParser Revert r193251 : Use address-taken to disambiguate global variable and indirect memops. 2013-10-27 03:08:44 +00:00
Bitcode Revert r193251 : Use address-taken to disambiguate global variable and indirect memops. 2013-10-27 03:08:44 +00:00
CodeGen Debug Info: support for DW_FORM_ref_addr. 2013-10-29 22:57:10 +00:00
DebugInfo DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build. 2013-10-29 16:32:19 +00:00
ExecutionEngine The FIXME was indeed fixed in the linker, comment removed. 2013-10-25 12:01:53 +00:00
IR Fix misapplied patch in r193597 2013-10-29 09:37:28 +00:00
IRReader
Linker Add a 'deleteModule' method to the Linker class. 2013-10-16 08:59:57 +00:00
LTO Move getSymbol to TargetLoweringObjectFile. 2013-10-29 17:28:26 +00:00
MC Move the STT_FILE symbols out of the normal symbol table processing for 2013-10-29 01:06:17 +00:00
Object Support for microMIPS jump instructions 2013-10-29 16:38:59 +00:00
Option Fix another mistake in r190442. 2013-09-10 23:22:56 +00:00
Support simplify ConstantRange::getSetSize() 2013-10-28 16:52:38 +00:00
TableGen Add an error check for a typo I accidentally made in a td file that caused an assert to fire. 2013-08-20 04:22:09 +00:00
Target Struct byval cleanup: add helper functions to reduce code duplication. 2013-10-29 22:27:32 +00:00
Transforms ARM cost model: Account for zero cost scalar SROA instructions 2013-10-29 01:33:53 +00:00
CMakeLists.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
LLVMBuild.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
Makefile Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00