// or 0 for global options
Elf_Word info; // Kind-specific information
- const Elf_Mips_RegInfo<ELFT> &getRegInfo() const {
+ Elf_Mips_RegInfo<ELFT> &getRegInfo() {
assert(kind == llvm::ELF::ODK_REGINFO);
- return *reinterpret_cast<const Elf_Mips_RegInfo<ELFT> *>(
- (const uint8_t *)this + sizeof(Elf_Mips_Options));
+ return *reinterpret_cast<Elf_Mips_RegInfo<ELFT> *>(
+ (uint8_t *)this + sizeof(Elf_Mips_Options));
+ }
+ const Elf_Mips_RegInfo<ELFT> &getRegInfo() const {
+ return const_cast<Elf_Mips_Options *>(this)->getRegInfo();
}
};