[PATCH] D140900: [DebugInfo] Print empty MDTuples wrapped in MetadataAsValue inline

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 4 07:58:45 PST 2023


StephenTozer added a comment.

Largely LGTM, but with a potential error that needs looking at.



================
Comment at: llvm/lib/IR/AsmWriter.cpp:4861
 
-  WriteAsOperandInternal(OS, &MD, *WriterCtx, /* FromValue */ true);
+  WriteAsOperandInternal(OS, &MD, *WriterCtx, /* FromValue */ false);
 
----------------
Setting this to `false`, while it makes total sense to me, caused an error in the LLDB test suite last time it was done[0][1]. Off the top of my head I'm not sure under what circumstances exactly we're calling `printMetadataImpl` directly for a `LocalAsMetadata` or `DIArgList`, but (much as a pain as it is) it probably needs to be verified that this error won't come up again - happy to investigate further myself if needed.

[0] https://reviews.llvm.org/D104827#2856347
[1] https://reviews.llvm.org/D104827#2898216


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

https://reviews.llvm.org/D140900



More information about the llvm-commits mailing list