diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-23 07:21:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-23 07:21:06 +0000 |
commit | f9f93e4388962b678fd59b7af5212d4cc0d38be2 (patch) | |
tree | 7533118fbe3bf30c1f6291cf882a8936a59e78f3 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 74670b26fc62dce36a9d1d78caa1d481cec5b2eb (diff) |
resolve a fixme: the "nonexecutable stack directive" is actually
a .section. Switch to it with SwitchSection.
However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 7238a52f03..fc2c5a00da 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -345,11 +345,8 @@ bool AsmPrinter::doFinalization(Module &M) { // to be executable. Some targets have a directive to declare this. Function *InitTrampolineIntrinsic = M.getFunction("llvm.init.trampoline"); if (!InitTrampolineIntrinsic || InitTrampolineIntrinsic->use_empty()) - // FIXME: This is actually a section switch on linux/x86 and systemz, use - // switch section. - if (MAI->getNonexecutableStackDirective()) - O << MAI->getNonexecutableStackDirective() << '\n'; - + if (MCSection *S = MAI->getNonexecutableStackSection(OutContext)) + OutStreamer.SwitchSection(S); // Allow the target to emit any magic that it wants at the end of the file, // after everything else has gone out. |