From ba31e27f0adb88edffeacd8c18fc760ce7e0a640 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 29 Jan 2015 17:33:21 +0000 Subject: 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 --- llvm/lib/MC/MCSectionELF.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'llvm/lib/MC/MCSectionELF.cpp') 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; -} -- cgit v1.2.3