[PATCH] D26074: [ELF] Add getOffset to ELFSectionRef and enable LLVM casting for it
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 11:44:59 PDT 2016
evgeny777 added a comment.
I have Sectio
================
Comment at: include/llvm/Object/ELFObjectFile.h:99-101
+ static inline bool classof(const SectionRef *v) {
+ return v->getObject()->isELF();
+ }
----------------
ruiu wrote:
> Why do you want this?
I have SectionRef object and I want to get section offset, which is ELF section property.
With this I can write:
```
cast<ELFSectionRef>(S)->getOffset();
```
Without it I have to use this one:
```
cast<ELFObjectFileBase>(S->getObject())->getSectionOffset(S->getRawDataRefImpl());
```
Repository:
rL LLVM
https://reviews.llvm.org/D26074
More information about the llvm-commits
mailing list