[PATCH] D145076: [llvm][DebugInfo] Introduce new DW_AT_LLVM_preferred_name attribute

Michael Buch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 11:25:02 PST 2023


Michael137 added inline comments.


================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:1304
+
+  void replacePreferredName(Metadata *PreferredName) {
+    replaceOperandWith(14, PreferredName);
----------------
aprantl wrote:
> Is this actually needed?
Yup, it's used in `CGDebugInfo` to attach the attribute on a structure definition


================
Comment at: llvm/test/Bitcode/attr-preferred_name-dicomposite.ll:4
+
+%struct.Foo = type { i8 }
+
----------------
aprantl wrote:
> I think we also want a test/DebugInfo test that checks dwarfdump output?
Yup, will add


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145076/new/

https://reviews.llvm.org/D145076



More information about the llvm-commits mailing list