mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +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 |
||
---|---|---|
.. | ||
bugpoint | ||
bugpoint-passes | ||
gold | ||
llc | ||
lli | ||
llvm-ar | ||
llvm-as | ||
llvm-bcanalyzer | ||
llvm-config | ||
llvm-cov | ||
llvm-diff | ||
llvm-dis | ||
llvm-dwarfdump | ||
llvm-extract | ||
llvm-jitlistener | ||
llvm-link | ||
llvm-mc | ||
llvm-mcmarkup | ||
llvm-nm | ||
llvm-objdump | ||
llvm-prof | ||
llvm-ranlib | ||
llvm-readobj | ||
llvm-rtdyld | ||
llvm-shlib | ||
llvm-size | ||
llvm-stress | ||
llvm-symbolizer | ||
lto | ||
macho-dump | ||
opt | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
Makefile |