[llvm-branch-commits] [clang] [KeyInstr][Clang] Add Clang option -g[no-]key-instructions (PR #134627)
Eli Friedman via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 6 14:51:33 PDT 2025
================
@@ -4767,6 +4767,13 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
CmdArgs.push_back("-gembed-source");
}
+ if (Args.hasFlag(options::OPT_gkey_instructions,
+ options::OPT_gno_key_instructions, false)) {
+ CmdArgs.push_back("-gkey-instructions");
----------------
efriedma-quic wrote:
It's not something we encourage. -mllvm flags have significant problems: they're global variables, they go through a separate parser from the regular flag parser, and they usually interact badly with LTO. But in practice, a lot of code does it this way because the "correct" way of adding a flag requires more boilerplate.
https://github.com/llvm/llvm-project/pull/134627
More information about the llvm-branch-commits
mailing list