diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-13 02:20:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-13 02:20:57 +0000 |
commit | 322fec671bcd4d4ade77bb8ad5a62728729c540a (patch) | |
tree | 9731c2dca57aaec1ff0163910e1ef52211bc1880 /llvm/lib/MC/MCParser/AsmParser.cpp | |
parent | 4689211583ce0f391f596ac712c658456649726b (diff) | |
download | bcm5719-llvm-322fec671bcd4d4ade77bb8ad5a62728729c540a.tar.gz bcm5719-llvm-322fec671bcd4d4ade77bb8ad5a62728729c540a.zip |
llvm-mc: Support -n, useful for comparing -integrated-as output since the
compiler may not lead with the text section.
llvm-svn: 98418
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 50964aea42b..a241106465a 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -138,15 +138,14 @@ const AsmToken &AsmParser::Lex() { return *tok; } -bool AsmParser::Run() { - // Create the initial section. +bool AsmParser::Run(bool NoInitialTextSection) { + // Create the initial section, if requested. // - // FIXME: Support -n. // FIXME: Target hook & command line option for initial section. - Out.SwitchSection(getMachOSection("__TEXT", "__text", - MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, - 0, SectionKind::getText())); - + if (!NoInitialTextSection) + Out.SwitchSection(getMachOSection("__TEXT", "__text", + MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, + 0, SectionKind::getText())); // Prime the lexer. Lex(); |