aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCSectionELF.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-04 23:22:29 +0000
committerChris Lattner <sabre@nondot.org>2010-04-04 23:22:29 +0000
commit3d2251361171b1a41bdb2ac71882e69d48617f49 (patch)
tree51fe8ca41666fd12af01d54c4afadb12dfc1f43d /include/llvm/MC/MCSectionELF.h
parentbe15beb54ace72508cb3e597c1819132bbbe66f1 (diff)
eliminate the magic AbsoluteDebugSectionOffsets MAI hook,
which is really a property of the section being referenced. Add a predicate to MCSection to replace it. Yay for reduction in magic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100367 91177308-0d34-0410-b5e6-96231b3b80d8
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 cdd2f73b34..e550cd2c11 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