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

Side by Side Diff: lib/MC/MCAsmStreamer.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 | « include/llvm/MC/MCDirectives.h ('k') | lib/MC/MCELFStreamer.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/MCAsmStreamer.cpp - Text Assembly Output --------------------===// 1 //===- lib/MC/MCAsmStreamer.cpp - Text Assembly 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 #include "llvm/MC/MCStreamer.h" 10 #include "llvm/MC/MCStreamer.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 assert(CurSection && "Cannot emit before setting section!"); 237 assert(CurSection && "Cannot emit before setting section!");
238 238
239 OS << *Symbol << MAI.getLabelSuffix(); 239 OS << *Symbol << MAI.getLabelSuffix();
240 EmitEOL(); 240 EmitEOL();
241 Symbol->setSection(*CurSection); 241 Symbol->setSection(*CurSection);
242 } 242 }
243 243
244 void MCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) { 244 void MCAsmStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
245 switch (Flag) { 245 switch (Flag) {
246 default: assert(0 && "Invalid flag!"); 246 default: assert(0 && "Invalid flag!");
247 case MCAF_SyntaxUnified: OS << "\t.syntax unified"; break;
247 case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break; 248 case MCAF_SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
248 } 249 }
249 EmitEOL(); 250 EmitEOL();
250 } 251 }
251 252
252 void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) { 253 void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
253 OS << *Symbol << " = " << *Value; 254 OS << *Symbol << " = " << *Value;
254 EmitEOL(); 255 EmitEOL();
255 256
256 // FIXME: Lift context changes into super class. 257 // FIXME: Lift context changes into super class.
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 } 707 }
707 708
708 MCStreamer *llvm::createAsmStreamer(MCContext &Context, 709 MCStreamer *llvm::createAsmStreamer(MCContext &Context,
709 formatted_raw_ostream &OS, 710 formatted_raw_ostream &OS,
710 bool isLittleEndian, 711 bool isLittleEndian,
711 bool isVerboseAsm, MCInstPrinter *IP, 712 bool isVerboseAsm, MCInstPrinter *IP,
712 MCCodeEmitter *CE, bool ShowInst) { 713 MCCodeEmitter *CE, bool ShowInst) {
713 return new MCAsmStreamer(Context, OS, isLittleEndian, isVerboseAsm, 714 return new MCAsmStreamer(Context, OS, isLittleEndian, isVerboseAsm,
714 IP, CE, ShowInst); 715 IP, CE, ShowInst);
715 } 716 }
OLDNEW
« no previous file with comments | « include/llvm/MC/MCDirectives.h ('k') | lib/MC/MCELFStreamer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698