diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-23 21:08:00 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-23 21:08:00 +0000 |
commit | a59d3e5af889662139b8b08f2175f12567491441 (patch) | |
tree | c91b05e3c724401c8bf6bcbf8ff3bdfd80450ef3 /llvm/docs/LangRef.rst | |
parent | dc88bd6e1fc483d6927604e6b2dc58f9d4d06316 (diff) | |
download | bcm5719-llvm-a59d3e5af889662139b8b08f2175f12567491441.tar.gz bcm5719-llvm-a59d3e5af889662139b8b08f2175f12567491441.zip |
DebugInfo: Remove MDString-based type references
Eliminate DITypeIdentifierMap and make DITypeRef a thin wrapper around
DIType*. It is no longer legal to refer to a DICompositeType by its
'identifier:', and DIBuilder no longer retains all types with an
'identifier:' automatically.
Aside from the bitcode upgrade, this is mainly removing logic to resolve
an MDString-based reference to an actualy DIType. The commits leading
up to this have made the implicit type map in DICompileUnit's
'retainedTypes:' field superfluous.
This does not remove DITypeRef, DIScopeRef, DINodeRef, and
DITypeRefArray, or stop using them in DI-related metadata. Although as
of this commit they aren't serving a useful purpose, there are patchces
under review to reuse them for CodeView support.
The tests in LLVM were updated with deref-typerefs.sh, which is attached
to the thread "[RFC] Lazy-loading of debug info metadata":
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098318.html
llvm-svn: 267296
Diffstat (limited to 'llvm/docs/LangRef.rst')
-rw-r--r-- | llvm/docs/LangRef.rst | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index d588b0514b0..e9762f69f40 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -4019,12 +4019,13 @@ The following ``tag:`` values are valid: DW_TAG_volatile_type = 53 DW_TAG_restrict_type = 55 +.. _DIDerivedTypeMember: + ``DW_TAG_member`` is used to define a member of a :ref:`composite type <DICompositeType>`. The type of the member is the ``baseType:``. The -``offset:`` is the member's bit offset. If the composite type has a non-empty -``identifier:``, then it respects ODR rules. In that case, the ``scope:`` -reference will be a :ref:`metadata string <metadata-string>`, and the member -will be uniqued solely based on its ``name:`` and ``scope:``. +``offset:`` is the member's bit offset. If the composite type has an ODR +``identifier:`` and does not set ``flags: DIFwdDecl``, then the member is +uniqued based only on its ``name:`` and ``scope:``. ``DW_TAG_inheritance`` and ``DW_TAG_friend`` are used in the ``elements:`` field of :ref:`composite types <DICompositeType>` to describe parents and @@ -4047,9 +4048,10 @@ DICompositeType structures and unions. ``elements:`` points to a tuple of the composed types. If the source language supports ODR, the ``identifier:`` field gives the unique -identifier used for type merging between modules. When specified, other types -can refer to composite types indirectly via a :ref:`metadata string -<metadata-string>` that matches their identifier. +identifier used for type merging between modules. When specified, +:ref:`subprogram declarations <DISubprogramDeclaration>` and :ref:`member +derived types <DIDerivedTypeMember>` that reference the ODR-type in their +``scope:`` change uniquing rules. For a given ``identifier:``, there should only be a single composite type that does not have ``flags: DIFlagFwdDecl`` set. LLVM tools that link modules @@ -4178,11 +4180,13 @@ metadata. The ``variables:`` field points at :ref:`variables <DILocalVariable>` that must be retained, even if their IR counterparts are optimized out of the IR. The ``type:`` field must point at an :ref:`DISubroutineType`. +.. _DISubprogramDeclaration: + When ``isDefinition: false``, subprograms describe a declaration in the type -tree as opposed to a definition of a funciton. If the scope is a -:ref:`metadata string <metadata-string>` then the composite type follows ODR -rules, and the subprogram declaration is uniqued based only on its -``linkageName:`` and ``scope:``. +tree as opposed to a definition of a function. If the scope is a composite +type with an ODR ``identifier:`` and that does not set ``flags: DIFwdDecl``, +then the subprogram declaration is uniqued based only on its ``linkageName:`` +and ``scope:``. .. code-block:: llvm |