Skip to content

Commit 87ba0cb

Browse files
author
git apple-llvm automerger
committed
Merge commit '34bb38ffbf12' from llvm.org/main into next
2 parents a6a6e5d + 34bb38f commit 87ba0cb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ New Compiler Flags
376376

377377
- New option ``-ignore-pch`` added to disable precompiled headers. It overrides ``-emit-pch`` and ``-include-pch``. (#GH142409, `PCHDocs <https://clang.llvm.org/docs/UsersManual.html#ignoring-a-pch-file>`_).
378378

379+
- New options ``-g[no-]key-instructions`` added, disabled by default. Reduces jumpiness of debug stepping for optimized code in some debuggers (not LLDB at this time). Not recommended for use without optimizations. DWARF only. Note both the positive and negative flags imply ``-g``.
380+
379381
Deprecated Compiler Flags
380382
-------------------------
381383

clang/include/clang/Driver/Options.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4873,9 +4873,9 @@ def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
48734873
defm key_instructions : BoolGOption<"key-instructions",
48744874
CodeGenOpts<"DebugKeyInstructions">, DefaultFalse,
48754875
NegFlag<SetFalse>, PosFlag<SetTrue, [], [],
4876-
"Enable Key Instructions, which reduces the jumpiness of optimized code stepping (DWARF only)."
4877-
" Requires LLVM built with LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS.">,
4878-
BothFlags<[HelpHidden], [ClangOption, CLOption, CC1Option]>>;
4876+
"Enable Key Instructions, which reduces the jumpiness of debug stepping in optimized C/C++ code"
4877+
" in some debuggers. DWARF only. Implies -g.">,
4878+
BothFlags<[], [ClangOption, CLOption, CC1Option]>>;
48794879
def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
48804880
def help : Flag<["-", "--"], "help">,
48814881
Visibility<[ClangOption, CC1Option, CC1AsOption,

clang/test/DebugInfo/KeyInstructions/flag.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
//// Default: Off.
44
// RUN: %clang -### -target x86_64 -c -gdwarf %s 2>&1 | FileCheck %s --check-prefixes=NO-KEY-INSTRUCTIONS
55

6+
//// Help.
7+
// RUN %clang --help | FileCheck %s --check-prefix=HELP
8+
// HELP: -gkey-instructions Enable Key Instructions, which reduces the jumpiness of debug stepping in optimized C/C++ code in some debuggers. DWARF only. Implies -g.
9+
610
// KEY-INSTRUCTIONS: "-gkey-instructions"
711
// NO-KEY-INSTRUCTIONS-NOT: key-instructions
812

0 commit comments

Comments
 (0)