Simplify handling of --noexecstack by using getNonexecutableStackSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219799 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-10-15 16:12:52 +00:00
parent 5c2d60d357
commit 90ce9f70e2
31 changed files with 81 additions and 127 deletions

View File

@ -123,15 +123,10 @@ namespace llvm {
const MCRegisterInfo &MRI,
const MCSubtargetInfo &STI,
MCContext &Ctx);
typedef MCStreamer *(*MCObjectStreamerCtorTy)(const Target &T,
StringRef TT,
MCContext &Ctx,
MCAsmBackend &TAB,
raw_ostream &_OS,
MCCodeEmitter *_Emitter,
const MCSubtargetInfo &STI,
bool RelaxAll,
bool NoExecStack);
typedef MCStreamer *(*MCObjectStreamerCtorTy)(
const Target &T, StringRef TT, MCContext &Ctx, MCAsmBackend &TAB,
raw_ostream &_OS, MCCodeEmitter *_Emitter, const MCSubtargetInfo &STI,
bool RelaxAll);
typedef MCStreamer *(*AsmStreamerCtorTy)(MCContext &Ctx,
formatted_raw_ostream &OS,
bool isVerboseAsm,
@ -423,18 +418,15 @@ namespace llvm {
/// \param _OS The stream object.
/// \param _Emitter The target independent assembler object.Takes ownership.
/// \param RelaxAll Relax all fixups?
/// \param NoExecStack Mark file as not needing a executable stack.
MCStreamer *createMCObjectStreamer(StringRef TT, MCContext &Ctx,
MCAsmBackend &TAB,
raw_ostream &_OS,
MCAsmBackend &TAB, raw_ostream &_OS,
MCCodeEmitter *_Emitter,
const MCSubtargetInfo &STI,
bool RelaxAll,
bool NoExecStack) const {
bool RelaxAll) const {
if (!MCObjectStreamerCtorFn)
return nullptr;
return MCObjectStreamerCtorFn(*this, TT, Ctx, TAB, _OS, _Emitter, STI,
RelaxAll, NoExecStack);
RelaxAll);
}
/// createAsmStreamer - Create a target specific MCStreamer.