diff options
Diffstat (limited to 'include/llvm/MC/MCSectionELF.h')
-rw-r--r-- | include/llvm/MC/MCSectionELF.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h index 26951725e4..c82de71282 100644 --- a/include/llvm/MC/MCSectionELF.h +++ b/include/llvm/MC/MCSectionELF.h @@ -66,6 +66,12 @@ public: virtual bool UseCodeAlign() const; virtual bool isVirtualSection() const; + /// isBaseAddressKnownZero - We know that non-allocatable sections (like + /// debug info) have a base of zero. + virtual bool isBaseAddressKnownZero() const { + return (getFlags() & ELF::SHF_ALLOC) == 0; + } + static bool classof(const MCSection *S) { return S->getVariant() == SV_ELF; } |