[llvm] [DWARF] Add option to add linkage_names to call_origin declaration refs (PR #89640)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 13:52:19 PDT 2024


================
@@ -35,13 +35,28 @@
 #include "llvm/Target/TargetLoweringObjectFile.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
+#include "llvm/Support/CommandLine.h"
 #include <iterator>
 #include <optional>
 #include <string>
 #include <utility>
 
 using namespace llvm;
 
+/// Query value using AddLinkageNamesToDeclCallOriginsForTuning.
+cl::opt<cl::boolOrDefault> AddLinkageNamesToDeclCallOrigins(
+    "add-linkage-names-to-declaration-call-origins", cl::Hidden,
+    cl::desc("Add DW_AT_linkage_name to function declaration DIEs "
+             "referenced by DW_AT_call_origin attributes. Enabled by default "
+             "for -gsce debugger tuning."));
+
----------------
dwblaikie wrote:

I think we /generally/ try not to use/add raw cl::opts, and instead pass things through the driver/frontend flag handling? (I might be wrong, if there's substantial precedent, let me know)

& not sure how this sits with @pogo59's general premise that debugger tuning shouldn't be reachable only through the tuning flags, but should be independently accessible (does independently accessible mean supported in the driver flags, or is -Xclang/cc1/mllvm flags sufficient to meet that requirement?)

https://github.com/llvm/llvm-project/pull/89640


More information about the llvm-commits mailing list