Skip to content

Commit 6676f64

Browse files
Merge pull request #6619 from adrian-prantl/stable-merge
Merge stable/20221013 into swift/release/5.9
2 parents df1442a + d707f32 commit 6676f64

File tree

193 files changed

+3213
-1337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3213
-1337
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,12 @@ def Artificial : InheritableAttr {
771771
let SimpleHandler = 1;
772772
}
773773

774+
def TransparentStepping: InheritableAttr {
775+
let Spellings = [Clang<"transparent_stepping">];
776+
let Subjects = SubjectList<[Function]>;
777+
let Documentation = [TransparentSteppingDocs];
778+
}
779+
774780
def XRayInstrument : InheritableAttr {
775781
let Spellings = [Clang<"xray_always_instrument">,
776782
Clang<"xray_never_instrument">];

clang/include/clang/Basic/AttrDocs.td

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6924,6 +6924,66 @@ As such, this function attribute is currently only supported on X86 targets.
69246924
}];
69256925
}
69266926

6927+
def TransparentSteppingDocs : Documentation {
6928+
let Category = DocCatFunction;
6929+
let Content = [{
6930+
The ``transparent_stepping`` attribute is intended as a hint for debuggers that this
6931+
function itself is not interesting, but it calls a function that might be. So, when
6932+
stepping in arrives at a function with this attribute, debuggers should transparently
6933+
step-in through it into the functions called by the annotated function (but not by
6934+
subsequent calls made by those functions), stopping at the first one its normal rules
6935+
for whether to stop says to stop at - or stepping out again if none qualify. Also, when
6936+
stepping out arrives at a function with this attribute, the debugger should continue
6937+
stepping out to its caller.
6938+
6939+
For example:
6940+
6941+
.. code-block:: c
6942+
6943+
int bar(void) {
6944+
return 42;
6945+
}
6946+
6947+
__attribute__((transparent_stepping))
6948+
int foo(void) {
6949+
return bar();
6950+
}
6951+
6952+
int caller(void) {
6953+
return foo();
6954+
}
6955+
6956+
Stepping into ``foo`` should step directly into ``bar`` instead, and stepping out of ``bar``
6957+
should stop in ``caller``.
6958+
6959+
Functions with the ``transparent_stepping`` attribute can be chained together:
6960+
6961+
.. code-block:: c
6962+
6963+
int baz(void) {
6964+
return 42;
6965+
}
6966+
6967+
__attribute__((transparent_stepping))
6968+
int bar(void) {
6969+
return baz();
6970+
}
6971+
6972+
__attribute__((transparent_stepping))
6973+
int foo(void) {
6974+
return bar();
6975+
}
6976+
6977+
int caller(void) {
6978+
return foo();
6979+
}
6980+
6981+
In this example, stepping into ``foo`` should step directly into ``baz``, and stepping out of
6982+
``baz`` should stop in ``caller``.
6983+
}];
6984+
}
6985+
6986+
69276987
def ReadOnlyPlacementDocs : Documentation {
69286988
let Category = DocCatType;
69296989
let Content = [{This attribute is attached to a structure, class or union declaration.

clang/include/clang/Basic/DiagnosticFrontendKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ def warn_module_config_macro_undef : Warning<
252252
def note_module_def_undef_here : Note<
253253
"macro was %select{defined|#undef'd}0 here">;
254254
def remark_module_build : Remark<"building module '%0' as '%1'">,
255+
ShowInSystemHeader,
255256
InGroup<ModuleBuild>;
256257
def remark_module_build_done : Remark<"finished building module '%0'">,
258+
ShowInSystemHeader,
257259
InGroup<ModuleBuild>;
258260
def remark_module_lock : Remark<"locking '%0' to build module '%1'">,
259261
InGroup<ModuleLock>;

clang/include/clang/Basic/DiagnosticSerializationKinds.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def note_module_file_conflict : Note<
7575

7676
def remark_module_import : Remark<
7777
"importing module '%0'%select{| into '%3'}2 from '%1'">,
78+
ShowInSystemHeader,
7879
InGroup<ModuleImport>;
7980

8081
def err_imported_module_not_found : Error<

0 commit comments

Comments
 (0)