[llvm] [ELFYAML] Introduce `CustomRawContent` (PR #115707)

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 07:19:52 PST 2024


================
@@ -757,6 +781,50 @@ struct Object {
 bool shouldAllocateFileSpace(ArrayRef<ProgramHeader> Phdrs,
                              const NoBitsSection &S);
 
+/// ELFYAML::Opt -- Abstract base class for ELFYAML to provide
+/// the interface for handling CustomRawConetentSection.
+///
+/// Users in ELFYAML should obtain the pointer with
+/// dyn_cast<ELFYAML::Opt> if IO::Opt is the instance from yaml::Opt.
+///
+///     if (auto *Opt = dyn_cast<ELFYAML::Opt>(IO.Opt))
+///
+/// Derivered classes should not modify OptClassID to ensue that
+/// dyn_cast<ELFYAML::Opt> can find this interface.
+class Opt : public yaml::Opt {
----------------
chapuni wrote:

Excuse me, I haven't understood your suggestion. Let me take more time.

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


More information about the llvm-commits mailing list