diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-01-29 17:33:21 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-01-29 17:33:21 +0000 |
commit | ba31e27f0adb88edffeacd8c18fc760ce7e0a640 (patch) | |
tree | d19de061f8fb47d45741a5f684d6291b7b5ec648 /llvm/lib/MC/MCAsmInfoELF.cpp | |
parent | 1610730faf589649b94d35dd88ac754b99d8afc4 (diff) | |
download | llvm-ba31e27f0adb88edffeacd8c18fc760ce7e0a640.zip llvm-ba31e27f0adb88edffeacd8c18fc760ce7e0a640.tar.gz llvm-ba31e27f0adb88edffeacd8c18fc760ce7e0a640.tar.bz2 |
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/MCAsmInfoELF.cpp')
-rw-r--r-- | llvm/lib/MC/MCAsmInfoELF.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAsmInfoELF.cpp b/llvm/lib/MC/MCAsmInfoELF.cpp index 2fe626e..cd61a43a 100644 --- a/llvm/lib/MC/MCAsmInfoELF.cpp +++ b/llvm/lib/MC/MCAsmInfoELF.cpp @@ -22,8 +22,7 @@ void MCAsmInfoELF::anchor() { } const MCSection * MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const { - return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, - 0, SectionKind::getMetadata()); + return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0); } MCAsmInfoELF::MCAsmInfoELF() { |