summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-09-15 21:48:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-09-15 21:48:40 +0000
commitf667d929ce17f686fcd667045f5943890401dda9 (patch)
tree6195d964f715f45fbca4d1bbe835124fc2b9c7b5 /llvm/lib/MC/MCParser/AsmParser.cpp
parent44857a38fa5d04d04bca44fdfc0026ae33a014f7 (diff)
downloadbcm5719-llvm-f667d929ce17f686fcd667045f5943890401dda9.tar.gz
bcm5719-llvm-f667d929ce17f686fcd667045f5943890401dda9.zip
Add a InitSections method to the streamer interface.
The ELF implementation now creates text, data and bss to match the gnu as behavior. The text streamer still has the old MachO specific behavior since the testsuite checks that it will error when a directive is given before a setting the current section for example. A nice benefit is that -n is not required anymore when producing ELF files. llvm-svn: 114027
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index 5ef6f682bfa..b3ffed846d5 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -365,12 +365,8 @@ const AsmToken &AsmParser::Lex() {
bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
// Create the initial section, if requested.
- //
- // FIXME: Target hook & command line option for initial section.
if (!NoInitialTextSection)
- Out.SwitchSection(Ctx.getMachOSection("__TEXT", "__text",
- MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
- 0, SectionKind::getText()));
+ Out.InitSections();
// Prime the lexer.
Lex();
OpenPOWER on IntegriCloud