summaryrefslogtreecommitdiffstats
path: root/llvm/docs/SourceLevelDebugging.rst
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-10-29 09:20:14 -0700
committerAdrian Prantl <aprantl@apple.com>2019-10-29 13:44:06 -0700
commitf919be336583349d883ba0dfdb3b2479a190b67c (patch)
tree8abf8bb775e050414bcd735d6702bfeb00418637 /llvm/docs/SourceLevelDebugging.rst
parent3260fa2cb09b78ad55e91d95a522d9dc455575f0 (diff)
[DWARF5] Added support for deleted C++ special member functions.
This patch adds support for deleted C++ special member functions in clang and llvm. Also added Defaulted member encodings for future support for defaulted member functions. Patch by Sourabh Singh Tomar! Differential Revision: https://reviews.llvm.org/D69215
Diffstat (limited to 'llvm/docs/SourceLevelDebugging.rst')
-rw-r--r--llvm/docs/SourceLevelDebugging.rst33
1 files changed, 33 insertions, 0 deletions
diff --git a/llvm/docs/SourceLevelDebugging.rst b/llvm/docs/SourceLevelDebugging.rst
index a887810db4d8..978184743314 100644
--- a/llvm/docs/SourceLevelDebugging.rst
+++ b/llvm/docs/SourceLevelDebugging.rst
@@ -989,6 +989,39 @@ a C/C++ front-end would generate the following descriptors:
...
}
+C++ specific debug information
+==============================
+
+C++ special member functions information
+----------------------------------------
+
+DWARF v5 introduces attributes defined to enhance debugging information of C++ programs. LLVM can generate (or omit) these appropriate DWARF attributes. In C++ a special member function Ctors, Dtors, Copy/Move Ctors, assignment operators can be declared with C++11 keyword deleted. This is represented in LLVM using spFlags value DISPFlagDeleted.
+
+Given a class declaration with copy constructor declared as deleted:
+
+.. code-block:: c
+
+ class foo {
+ public:
+ foo(const foo&) = deleted;
+ };
+
+A C++ frontend would generate follwing:
+
+.. code-block:: text
+
+ !17 = !DISubprogram(name: "foo", scope: !11, file: !1, line: 5, type: !18, scopeLine: 5, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagDeleted)
+
+and this will produce an additional DWARF attibute as:
+
+.. code-block:: text
+
+ DW_TAG_subprogram [7] *
+ DW_AT_name [DW_FORM_strx1] (indexed (00000006) string = "foo")
+ DW_AT_decl_line [DW_FORM_data1] (5)
+ ...
+ DW_AT_deleted [DW_FORM_flag_present] (true)
+
Fortran specific debug information
==================================