llvm-6502/lib
Eli Bendersky 030f63a397 Expose an InitToTextSection through MCStreamer.
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
2013-01-14 19:04:57 +00:00
..
Analysis fix compile-time regression report by Joerg Sonnenberger: 2013-01-13 18:02:57 +00:00
Archive Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
AsmParser There was a switch fall-through in the parser for textual LLVM that caused 2013-01-07 13:32:38 +00:00
Bitcode Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test hangings. 2013-01-09 23:36:50 +00:00
CodeGen When lowering an inreg sext first shift left, then right arithmetically. 2013-01-12 19:06:44 +00:00
DebugInfo [Object, DebugInfo] Make DWARFContext BE-aware. 2013-01-09 02:45:05 +00:00
ExecutionEngine Fix bug in exception table allocation (PR13678) 2013-01-11 16:33:30 +00:00
IR Support for half intrinsics. Pushes MMX into slower encoding path. 2013-01-11 01:45:05 +00:00
Linker Fix a copy/paste error in the IR Linker, casting an ArrayType instead of a VectorType. 2013-01-10 10:49:36 +00:00
MC Expose an InitToTextSection through MCStreamer. 2013-01-14 19:04:57 +00:00
Object [Object][Archive] Fix name handling with bsd style long names. 2013-01-10 01:05:34 +00:00
Option Resort the #include lines in include/... and lib/... with the 2013-01-02 10:22:59 +00:00
Support Revert r171829 "Split changeset_ty using iterators instead of loops" as it breaks the VS2008 build 2013-01-14 14:13:06 +00:00
TableGen TableGen: Keep track of superclass reference ranges. 2013-01-10 18:50:11 +00:00
Target Simplify nested strconcats in X86 td files since strconcat can take more than 2 arguments. 2013-01-14 07:46:34 +00:00
Transforms Fixed some 80+ violations. 2013-01-14 01:47:53 +00:00
CMakeLists.txt Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
LLVMBuild.txt Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
Makefile Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00