summaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCSectionELF.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCSectionELF.h')
-rw-r--r--include/llvm/MC/MCSectionELF.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h
index cdd2f73..e550cd2 100644
--- a/include/llvm/MC/MCSectionELF.h
+++ b/include/llvm/MC/MCSectionELF.h
@@ -172,6 +172,11 @@ public:
virtual void PrintSwitchToSection(const MCAsmInfo &MAI,
raw_ostream &OS) const;
+ /// isBaseAddressKnownZero - We know that non-allocatable sections (like
+ /// debug info) have a base of zero.
+ virtual bool isBaseAddressKnownZero() const {
+ return (getFlags() & SHF_ALLOC) == 0;
+ }
/// PrintTargetSpecificSectionFlags - Targets that define their own
/// MCSectionELF subclasses with target specific section flags should
OpenPOWER on IntegriCloud