aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCSectionCOFF.cpp
diff options
context:
space:
mode:
authorJan Wen Voung <jvoung@google.com>2010-10-04 17:32:41 +0000
committerJan Wen Voung <jvoung@google.com>2010-10-04 17:32:41 +0000
commit083cf1574facc9ce468fba1735c794bd7e520108 (patch)
tree89bc4a3eeececcf7162c44251e43316055fa47e0 /lib/MC/MCSectionCOFF.cpp
parent7a391832f46ca2947f6ee46f6fad53cf64197d28 (diff)
downloadexternal_llvm-083cf1574facc9ce468fba1735c794bd7e520108.zip
external_llvm-083cf1574facc9ce468fba1735c794bd7e520108.tar.gz
external_llvm-083cf1574facc9ce468fba1735c794bd7e520108.tar.bz2
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/MCSectionCOFF.cpp')
-rw-r--r--lib/MC/MCSectionCOFF.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/MC/MCSectionCOFF.cpp b/lib/MC/MCSectionCOFF.cpp
index eb53160..0909df4 100644
--- a/lib/MC/MCSectionCOFF.cpp
+++ b/lib/MC/MCSectionCOFF.cpp
@@ -74,3 +74,7 @@ void MCSectionCOFF::PrintSwitchToSection(const MCAsmInfo &MAI,
}
}
}
+
+bool MCSectionCOFF::UseCodeAlign() const {
+ return getKind().isText();
+}