mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
030f63a397
The aim of this patch is to fix the following piece of code in the platform-independent AsmParser: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.SwitchSection(Ctx.getMachOSection( "__TEXT", "__text", MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS, 0, SectionKind::getText())); } } This was added for the "-n" option of llvm-mc. The proposed fix adds another virtual method to MCStreamer, called InitToTextSection. Conceptually, it's similar to the existing InitSections which initializes all common sections and switches to text. The new method is implemented by each platform streamer in a way that it sees fit. So AsmParser can now do this: void AsmParser::CheckForValidSection() { if (!ParsingInlineAsm && !getStreamer().getCurrentSection()) { TokError("expected section directive before assembly directive"); Out.InitToTextSection(); } } Which is much more reasonable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172450 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
MCDisassembler | ||
MCParser | ||
CMakeLists.txt | ||
ELFObjectWriter.cpp | ||
LLVMBuild.txt | ||
MachObjectWriter.cpp | ||
Makefile | ||
MCAsmBackend.cpp | ||
MCAsmInfo.cpp | ||
MCAsmInfoCOFF.cpp | ||
MCAsmInfoDarwin.cpp | ||
MCAsmStreamer.cpp | ||
MCAssembler.cpp | ||
MCAtom.cpp | ||
MCCodeEmitter.cpp | ||
MCCodeGenInfo.cpp | ||
MCContext.cpp | ||
MCDisassembler.cpp | ||
MCDwarf.cpp | ||
MCELF.cpp | ||
MCELFObjectTargetWriter.cpp | ||
MCELFStreamer.cpp | ||
MCExpr.cpp | ||
MCInst.cpp | ||
MCInstPrinter.cpp | ||
MCInstrAnalysis.cpp | ||
MCLabel.cpp | ||
MCMachObjectTargetWriter.cpp | ||
MCMachOStreamer.cpp | ||
MCModule.cpp | ||
MCNullStreamer.cpp | ||
MCObjectFileInfo.cpp | ||
MCObjectStreamer.cpp | ||
MCObjectWriter.cpp | ||
MCPureStreamer.cpp | ||
MCRegisterInfo.cpp | ||
MCSection.cpp | ||
MCSectionCOFF.cpp | ||
MCSectionELF.cpp | ||
MCSectionMachO.cpp | ||
MCStreamer.cpp | ||
MCSubtargetInfo.cpp | ||
MCSymbol.cpp | ||
MCValue.cpp | ||
MCWin64EH.cpp | ||
SubtargetFeature.cpp | ||
WinCOFFObjectWriter.cpp | ||
WinCOFFStreamer.cpp |