Simplify handling of --noexecstack by using getNonexecutableStackSection.
[oota-llvm.git] / lib / MC / MCParser / AsmParser.cpp
index cc1f293ffd399e8e037aef6a0ee61c11b4160499..de7d96129f18e3bb71e75a6953f04197149b536e 100644 (file)
@@ -607,7 +607,7 @@ const AsmToken &AsmParser::Lex() {
 bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
   // Create the initial section, if requested.
   if (!NoInitialTextSection)
-    Out.InitSections();
+    Out.InitSections(false);
 
   // Prime the lexer.
   Lex();
@@ -690,7 +690,7 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
 void AsmParser::checkForValidSection() {
   if (!ParsingInlineAsm && !getStreamer().getCurrentSection().first) {
     TokError("expected section directive before assembly directive");
-    Out.InitSections();
+    Out.InitSections(false);
   }
 }