aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCSectionELF.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-03-12 13:07:37 +0000
committerDuncan Sands <baldrick@free.fr>2011-03-12 13:07:37 +0000
commitba9934648f1b8f5b1749548963f385f1147c1f68 (patch)
tree2dcd6708c44b08706b4918ee20dff189d03d85bd /include/llvm/MC/MCSectionELF.h
parentc5c03f90240e1d2bf9f1579ae14b5dc8f0547c33 (diff)
Speculatively revert commit 127478 (jsjodin) in an attempt to fix the
llvm-gcc-i386-linux-selfhost and llvm-x86_64-linux-checks buildbots. The original log entry: Remove optimization emitting a reference insted of label difference, since it can create more relocations. Removed isBaseAddressKnownZero method, because it is no longer used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCSectionELF.h')
-rw-r--r--include/llvm/MC/MCSectionELF.h6
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;
}