[PATCH] D123534: [dwarf] Emit a DIGlobalVariable for constant strings.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 09:27:45 PDT 2022

dblaikie added a comment.

Size still seems moderately concerning, but might be acceptable.

Got a summary of what the DWARF looks like now (without names)? (maybe there's something else we can strip/optimize)

& how many of these descriptions get added to the debug info?

Numbers for Split DWARF may be helpful too - given this'll add an extra address/relocation for every string literal, it might make object size (specifically unlinked object size where relocations are expensive/plentiful) significantly larger in problematic ways.

Comment at: clang/test/CodeGen/debug-info-variables.c:1
+// RUN: %clang_cc1 %s -debug-info-kind=standalone -S -emit-llvm -o - | FileCheck %s
Presumably named variables are already tested elsewhere - so I probably wouldn't test them here, and would give this file a more specific name related to string literals. Alternatively/perhaps the other thing to do would be to find some test that already covers global variable debug info, and test string literals there?

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list