[llvm-commits] [llvm] r98413 - in /llvm/trunk/lib/Target/X86/AsmPrinter: X86AsmPrinter.cpp X86AsmPrinter.h
Chris Lattner
sabre at nondot.org
Fri Mar 12 18:10:00 PST 2010
Author: lattner
Date: Fri Mar 12 20:10:00 2010
New Revision: 98413
URL: http://llvm.org/viewvc/llvm-project?rev=98413&view=rev
Log:
switch to the text section at the start of the .s file for darwin/x86
targets. This is a temporary hack for the .o file writer that Daniel
wants :)
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=98413&r1=98412&r2=98413&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Fri Mar 12 20:10:00 2010
@@ -459,6 +459,11 @@
return false;
}
+void X86AsmPrinter::EmitStartOfAsmFile(Module &M) {
+ if (Subtarget->isTargetDarwin())
+ OutStreamer.SwitchSection(getObjFileLowering().getTextSection());
+}
+
void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
if (Subtarget->isTargetDarwin()) {
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h?rev=98413&r1=98412&r2=98413&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.h Fri Mar 12 20:10:00 2010
@@ -55,7 +55,8 @@
AsmPrinter::getAnalysisUsage(AU);
}
-
+ virtual void EmitStartOfAsmFile(Module &M);
+
virtual void EmitEndOfAsmFile(Module &M);
virtual void EmitInstruction(const MachineInstr *MI);
More information about the llvm-commits
mailing list