summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSectionELF.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-01-29 17:33:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-01-29 17:33:21 +0000
commitba31e27f0adb88edffeacd8c18fc760ce7e0a640 (patch)
treed19de061f8fb47d45741a5f684d6291b7b5ec648 /llvm/lib/MC/MCSectionELF.cpp
parent1610730faf589649b94d35dd88ac754b99d8afc4 (diff)
downloadbcm5719-llvm-ba31e27f0adb88edffeacd8c18fc760ce7e0a640.tar.gz
bcm5719-llvm-ba31e27f0adb88edffeacd8c18fc760ce7e0a640.zip
Compute the ELF SectionKind from the flags.
Any code creating an MCSectionELF knows ELF and already provides the flags. SectionKind is an abstraction used by common code that uses a plain MCSection. Use the flags to compute the SectionKind. This removes a lot of guessing and boilerplate from the MCSectionELF construction. llvm-svn: 227476
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index a29bb97af8f..fb364c87a03 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -157,13 +157,3 @@ bool MCSectionELF::UseCodeAlign() const {
bool MCSectionELF::isVirtualSection() const {
return getType() == ELF::SHT_NOBITS;
}
-
-unsigned MCSectionELF::DetermineEntrySize(SectionKind Kind) {
- if (Kind.isMergeable1ByteCString()) return 1;
- if (Kind.isMergeable2ByteCString()) return 2;
- if (Kind.isMergeable4ByteCString()) return 4;
- if (Kind.isMergeableConst4()) return 4;
- if (Kind.isMergeableConst8()) return 8;
- if (Kind.isMergeableConst16()) return 16;
- return 0;
-}
OpenPOWER on IntegriCloud