OLD | NEW |
1 //===- lib/MC/MCELFStreamer.cpp - ELF Object Output ------------===// | 1 //===- lib/MC/MCELFStreamer.cpp - ELF Object Output ------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file assembles .s files and emits ELF .o object files. | 10 // This file assembles .s files and emits ELF .o object files. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // fragment pointer when we emit the next fragment. | 190 // fragment pointer when we emit the next fragment. |
191 MCDataFragment *F = getOrCreateDataFragment(); | 191 MCDataFragment *F = getOrCreateDataFragment(); |
192 | 192 |
193 assert(!SD.getFragment() && "Unexpected fragment on symbol data!"); | 193 assert(!SD.getFragment() && "Unexpected fragment on symbol data!"); |
194 SD.setFragment(F); | 194 SD.setFragment(F); |
195 SD.setOffset(F->getContents().size()); | 195 SD.setOffset(F->getContents().size()); |
196 } | 196 } |
197 | 197 |
198 void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { | 198 void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { |
199 switch (Flag) { | 199 switch (Flag) { |
| 200 case MCAF_SyntaxUnified: return; // no-op here? |
200 case MCAF_SubsectionsViaSymbols: | 201 case MCAF_SubsectionsViaSymbols: |
201 getAssembler().setSubsectionsViaSymbols(true); | 202 getAssembler().setSubsectionsViaSymbols(true); |
202 return; | 203 return; |
203 } | 204 } |
204 | 205 |
205 assert(0 && "invalid assembler flag!"); | 206 assert(0 && "invalid assembler flag!"); |
206 } | 207 } |
207 | 208 |
208 void MCELFStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) { | 209 void MCELFStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) { |
209 // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into | 210 // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 } | 554 } |
554 | 555 |
555 MCStreamer *llvm::createELFStreamer(MCContext &Context, TargetAsmBackend &TAB, | 556 MCStreamer *llvm::createELFStreamer(MCContext &Context, TargetAsmBackend &TAB, |
556 raw_ostream &OS, MCCodeEmitter *CE, | 557 raw_ostream &OS, MCCodeEmitter *CE, |
557 bool RelaxAll) { | 558 bool RelaxAll) { |
558 MCELFStreamer *S = new MCELFStreamer(Context, TAB, OS, CE); | 559 MCELFStreamer *S = new MCELFStreamer(Context, TAB, OS, CE); |
559 if (RelaxAll) | 560 if (RelaxAll) |
560 S->getAssembler().setRelaxAll(true); | 561 S->getAssembler().setRelaxAll(true); |
561 return S; | 562 return S; |
562 } | 563 } |
OLD | NEW |