[llvm] [ELFYAML] Introduce `CustomRawContent` (PR #115707)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 02:00:29 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 {
----------------
jh7370 wrote:
Why does your new class type need a completely different approach to e.g. `HashSection` or `NoteSection`?
https://github.com/llvm/llvm-project/pull/115707
More information about the llvm-commits
mailing list