From f2dc4aa562e2478a73fe5aeeeec16b1e496a0642 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 17 Nov 2010 20:03:54 +0000 Subject: make isVirtualSection a virtual method on MCSection. Chris' suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119547 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCSectionMachO.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/MC/MCSectionMachO.cpp') diff --git a/lib/MC/MCSectionMachO.cpp b/lib/MC/MCSectionMachO.cpp index 0b74636d42..43268e63bb 100644 --- a/lib/MC/MCSectionMachO.cpp +++ b/lib/MC/MCSectionMachO.cpp @@ -152,6 +152,12 @@ bool MCSectionMachO::UseCodeAlign() const { return hasAttribute(MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS); } +bool MCSectionMachO::isVirtualSection() const { + return (getType() == MCSectionMachO::S_ZEROFILL || + getType() == MCSectionMachO::S_GB_ZEROFILL || + getType() == MCSectionMachO::S_THREAD_LOCAL_ZEROFILL); +} + /// StripSpaces - This removes leading and trailing spaces from the StringRef. static void StripSpaces(StringRef &Str) { while (!Str.empty() && isspace(Str[0])) -- cgit v1.2.3