summaryrefslogtreecommitdiff
path: root/lib/MC/MCParser/DarwinAsmParser.cpp
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2012-12-17 17:59:32 +0000
committerTim Northover <Tim.Northover@arm.com>2012-12-17 17:59:32 +0000
commit1c2b2f9c56c01aa1c317da4fd0234eaa1fe6e739 (patch)
treec9a50c3e1d261072b9a81cb9efb07b20f45b281c /lib/MC/MCParser/DarwinAsmParser.cpp
parent2dfa3eb56679fcb0ac36d2956924e59acf4fc19e (diff)
downloadllvm-1c2b2f9c56c01aa1c317da4fd0234eaa1fe6e739.tar.gz
llvm-1c2b2f9c56c01aa1c317da4fd0234eaa1fe6e739.tar.bz2
llvm-1c2b2f9c56c01aa1c317da4fd0234eaa1fe6e739.tar.xz
Teach MachO which sections contain code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser/DarwinAsmParser.cpp')
-rw-r--r--lib/MC/MCParser/DarwinAsmParser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/MCParser/DarwinAsmParser.cpp b/lib/MC/MCParser/DarwinAsmParser.cpp
index 20c949dbda..7b042df292 100644
--- a/lib/MC/MCParser/DarwinAsmParser.cpp
+++ b/lib/MC/MCParser/DarwinAsmParser.cpp
@@ -314,7 +314,7 @@ bool DarwinAsmParser::ParseSectionSwitch(const char *Segment,
Lex();
// FIXME: Arch specific.
- bool isText = StringRef(Segment) == "__TEXT"; // FIXME: Hack.
+ bool isText = TAA & MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS;
getStreamer().SwitchSection(getContext().getMachOSection(
Segment, Section, TAA, StubSize,
isText ? SectionKind::getText()