LLVM backend for 6502
Go to file
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
autoconf Update so that it uses the `-V' command line option and supports Python 3.x. 2013-10-12 08:42:59 +00:00
bindings
cmake Remove NDBEUG from all release types compile flags. 2013-10-19 07:30:37 +00:00
docs Fix common typos in the docs. 2013-10-29 17:53:27 +00:00
examples Add missing #include's to cctype when using isdigit/alpha/etc. 2013-10-12 00:55:57 +00:00
include [stackprotector] Update the StackProtector pass to perform datalayout analysis. 2013-10-29 21:16:16 +00:00
lib Debug Info: support for DW_FORM_ref_addr. 2013-10-29 22:57:10 +00:00
projects Revert "Revert "Windows: Add support for unicode command lines"" 2013-10-07 01:00:07 +00:00
test Debug Info: instead of calling addToContextOwner which constructs the context 2013-10-29 22:49:29 +00:00
tools Support names like llvm-ar-3.4 and llvm-ranlib-3.4. 2013-10-29 14:25:43 +00:00
unittests DWARF parser: propery handle DW_FORM_ref_sig8 and fix Windows build. 2013-10-29 16:32:19 +00:00
utils TableGen: remove unused variable. 2013-10-28 18:19:04 +00:00
.arcconfig
.clang-format
.gitignore
CMakeLists.txt Remove 2.4 from the list of supported Python versions. 2013-10-28 21:22:23 +00:00
CODE_OWNERS.TXT
configure Update so that it uses the `-V' command line option and supports Python 3.x. 2013-10-12 08:42:59 +00:00
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.