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

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 14:05:41 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."));
+
----------------
OCHyams wrote:

FWIW `-dwarf-linkage-names` is an `-mllvm` flag too (happy to move the flag around as needed though - I don't have a strong opinion on it)

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


More information about the llvm-commits mailing list