[PATCH] D127165: [DirectX][MC] Add MC support for DXContainer

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 08:40:36 PDT 2022


kuhar added inline comments.


================
Comment at: llvm/lib/MC/MCContext.cpp:851
+
+  StringRef Name = R.first->first();
+  R.first->second =
----------------
beanz wrote:
> kuhar wrote:
> > Isn't this the same as the `Section` argument?
> It should be the same text, but is likely a different address. The address from the StringMap is guaranteed to remain valid through the lifetime of the object writer, while the input may come from an IR construct that has a different lifetime (aren't unowned StringRefs fun?).
Gah... Can you explain this in a comment?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127165



More information about the llvm-commits mailing list