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

Unified Diff: lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp

Issue 1181263004: subclassed MCAsmStreamer (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Target/X86/MCTargetDesc/X86MCNaClAsmStreamer.cpp ('k') | test/MC/X86/nacl-test-ret.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
index c5c8ec01f154047959083c08ccaf9cbf5e1288d1..1a7cf1622396e28a584631ae04df17e9bf48c815 100644
--- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
+++ b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
@@ -15,6 +15,7 @@
#include "InstPrinter/X86ATTInstPrinter.h"
#include "InstPrinter/X86IntelInstPrinter.h"
#include "X86MCAsmInfo.h"
+#include "X86MCNaClAsmStreamer.h"
#include "llvm/ADT/Triple.h"
#include "llvm/MC/MCCodeGenInfo.h"
#include "llvm/MC/MCInstrAnalysis.h"
@@ -234,6 +235,15 @@ static MCInstrAnalysis *createX86MCInstrAnalysis(const MCInstrInfo *Info) {
return new MCInstrAnalysis(Info);
}
+static MCStreamer *createX86MCNaClAsmStreamer(MCContext &Context,
+ std::unique_ptr<formatted_raw_ostream> OS,
+ bool isVerboseAsm, bool useDwarfDirectory,
+ MCInstPrinter *IP, MCCodeEmitter *CE,
+ MCAsmBackend *MAB, bool ShowInst) {
+ return new X86MCNaClAsmStreamer(Context, std::move(OS), isVerboseAsm,
+ useDwarfDirectory, IP, CE, MAB, ShowInst);
+}
+
// Force static initialization.
extern "C" void LLVMInitializeX86TargetMC() {
for (Target *T : {&TheX86_32Target, &TheX86_64Target}) {
@@ -261,7 +271,11 @@ extern "C" void LLVMInitializeX86TargetMC() {
#ifndef __native_client__
// Register the object streamer.
TargetRegistry::RegisterCOFFStreamer(*T, createX86WinCOFFStreamer);
+
+
#endif
+ TargetRegistry::RegisterNaClAsmStreamer(*T, createX86MCNaClAsmStreamer);
+
// Register the MCInstPrinter.
TargetRegistry::RegisterMCInstPrinter(*T, createX86MCInstPrinter);
« no previous file with comments | « lib/Target/X86/MCTargetDesc/X86MCNaClAsmStreamer.cpp ('k') | test/MC/X86/nacl-test-ret.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698