diff options
author | Jan Wen Voung <jvoung@google.com> | 2010-10-04 17:32:41 +0000 |
---|---|---|
committer | Jan Wen Voung <jvoung@google.com> | 2010-10-04 17:32:41 +0000 |
commit | 083cf1574facc9ce468fba1735c794bd7e520108 (patch) | |
tree | 89bc4a3eeececcf7162c44251e43316055fa47e0 /lib/MC/MCSectionELF.cpp | |
parent | 7a391832f46ca2947f6ee46f6fad53cf64197d28 (diff) | |
download | llvm-083cf1574facc9ce468fba1735c794bd7e520108.tar.gz llvm-083cf1574facc9ce468fba1735c794bd7e520108.tar.bz2 llvm-083cf1574facc9ce468fba1735c794bd7e520108.tar.xz |
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
Diffstat (limited to 'lib/MC/MCSectionELF.cpp')
-rw-r--r-- | lib/MC/MCSectionELF.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index ef935d0c64..133cad1b32 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/lib/MC/MCSectionELF.cpp @@ -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. |