Add hook in MCSection to decide when to use "optimized nops", for each

section kind. Previously, optimized nops were only used for MachO.
Also added tests for ELF and COFF.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jan Wen Voung
2010-10-04 17:32:41 +00:00
parent 7a391832f4
commit 083cf1574f
13 changed files with 113 additions and 9 deletions

View File

@@ -112,6 +112,10 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI,
OS << '\n';
}
bool MCSectionELF::UseCodeAlign() const {
return getFlags() & MCSectionELF::SHF_EXECINSTR;
}
// HasCommonSymbols - True if this section holds common symbols, this is
// indicated on the ELF object file by a symbol with SHN_COMMON section
// header index.