Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: lib/MC/MCELFStreamer.cpp

Issue 3551007: ARM MC .s EmitStartOfAsm proof-of-concept cleanup (Closed) Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | lib/Target/ARM/ARMAsmPrinter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | lib/Target/ARM/ARMAsmPrinter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698