forked from OSchip/llvm-project
[mips] Add non-const getter for the Elf_Mips_Options class. NFC
llvm-svn: 286351
This commit is contained in:
parent
28f29487b9
commit
96b4b713fc
|
@ -608,10 +608,13 @@ template <class ELFT> struct Elf_Mips_Options {
|
|||
// 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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue