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 | 87f77b5f9a5654490cef338ae9f13703b915168e (patch) | |
tree | 242c3ab65b821a1972dce6be26aecb15207e13e9 /llvm/lib/MC/MCSectionELF.cpp | |
parent | 0d9c993401bd557b0c5953a4e6fdf4d79f5a52bc (diff) | |
download | bcm5719-llvm-87f77b5f9a5654490cef338ae9f13703b915168e.tar.gz bcm5719-llvm-87f77b5f9a5654490cef338ae9f13703b915168e.zip |
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.
llvm-svn: 115523
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r-- | llvm/lib/MC/MCSectionELF.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp index ef935d0c64b..133cad1b32c 100644 --- a/llvm/lib/MC/MCSectionELF.cpp +++ b/llvm/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. |