mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
MC: Remove NullStreamer hook, as it is redundant with NullTargetStreamer.
llvm-svn: 229799
This commit is contained in:
parent
258bbf91ac
commit
ce7b5daef7
@ -139,7 +139,6 @@ namespace llvm {
|
||||
MCCodeEmitter *CE,
|
||||
MCAsmBackend *TAB,
|
||||
bool ShowInst);
|
||||
typedef MCStreamer *(*NullStreamerCtorTy)(MCContext &Ctx);
|
||||
typedef MCTargetStreamer *(*NullTargetStreamerCtorTy)(MCStreamer &S);
|
||||
typedef MCRelocationInfo *(*MCRelocationInfoCtorTy)(StringRef TT,
|
||||
MCContext &Ctx);
|
||||
@ -225,10 +224,6 @@ namespace llvm {
|
||||
/// AsmStreamer, if registered (default = llvm::createAsmStreamer).
|
||||
AsmStreamerCtorTy AsmStreamerCtorFn;
|
||||
|
||||
/// Construction function for this target's NullStreamer, if registered
|
||||
/// (default = llvm::createNullStreamer).
|
||||
NullStreamerCtorTy NullStreamerCtorFn;
|
||||
|
||||
/// Construction function for this target's null TargetStreamer, if
|
||||
/// registered (default = nullptr).
|
||||
NullTargetStreamerCtorTy NullTargetStreamerCtorFn;
|
||||
@ -243,8 +238,8 @@ namespace llvm {
|
||||
|
||||
public:
|
||||
Target()
|
||||
: AsmStreamerCtorFn(nullptr), NullStreamerCtorFn(nullptr),
|
||||
MCRelocationInfoCtorFn(nullptr), MCSymbolizerCtorFn(nullptr) {}
|
||||
: AsmStreamerCtorFn(nullptr), MCRelocationInfoCtorFn(nullptr),
|
||||
MCSymbolizerCtorFn(nullptr) {}
|
||||
|
||||
/// @name Target Information
|
||||
/// @{
|
||||
@ -454,9 +449,9 @@ namespace llvm {
|
||||
}
|
||||
|
||||
MCStreamer *createNullStreamer(MCContext &Ctx) const {
|
||||
if (NullStreamerCtorFn)
|
||||
return NullStreamerCtorFn(Ctx);
|
||||
return llvm::createNullStreamer(Ctx);
|
||||
MCStreamer *S = llvm::createNullStreamer(Ctx);
|
||||
createNullTargetStreamer(*S);
|
||||
return S;
|
||||
}
|
||||
|
||||
MCTargetStreamer *createNullTargetStreamer(MCStreamer &S) const {
|
||||
@ -791,10 +786,6 @@ namespace llvm {
|
||||
T.AsmStreamerCtorFn = Fn;
|
||||
}
|
||||
|
||||
static void RegisterNullStreamer(Target &T, Target::NullStreamerCtorTy Fn) {
|
||||
T.NullStreamerCtorFn = Fn;
|
||||
}
|
||||
|
||||
static void
|
||||
RegisterNullTargetStreamer(Target &T, Target::NullTargetStreamerCtorTy Fn) {
|
||||
T.NullTargetStreamerCtorFn = Fn;
|
||||
|
@ -1354,12 +1354,6 @@ MCStreamer *createMCAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS,
|
||||
return S;
|
||||
}
|
||||
|
||||
MCStreamer *createARMNullStreamer(MCContext &Ctx) {
|
||||
MCStreamer *S = llvm::createNullStreamer(Ctx);
|
||||
new ARMTargetStreamer(*S);
|
||||
return S;
|
||||
}
|
||||
|
||||
MCTargetStreamer *createARMNullTargetStreamer(MCStreamer &S) {
|
||||
return new ARMTargetStreamer(S);
|
||||
}
|
||||
|
@ -455,12 +455,6 @@ extern "C" void LLVMInitializeARMTargetMC() {
|
||||
TargetRegistry::RegisterAsmStreamer(TheThumbLETarget, createMCAsmStreamer);
|
||||
TargetRegistry::RegisterAsmStreamer(TheThumbBETarget, createMCAsmStreamer);
|
||||
|
||||
// Register the null streamer.
|
||||
TargetRegistry::RegisterNullStreamer(TheARMLETarget, createARMNullStreamer);
|
||||
TargetRegistry::RegisterNullStreamer(TheARMBETarget, createARMNullStreamer);
|
||||
TargetRegistry::RegisterNullStreamer(TheThumbLETarget, createARMNullStreamer);
|
||||
TargetRegistry::RegisterNullStreamer(TheThumbBETarget, createARMNullStreamer);
|
||||
|
||||
// Register the null TargetStreamer.
|
||||
TargetRegistry::RegisterNullTargetStreamer(TheARMLETarget,
|
||||
createARMNullTargetStreamer);
|
||||
|
@ -52,8 +52,6 @@ MCStreamer *createMCAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS,
|
||||
MCInstPrinter *InstPrint, MCCodeEmitter *CE,
|
||||
MCAsmBackend *TAB, bool ShowInst);
|
||||
|
||||
MCStreamer *createARMNullStreamer(MCContext &Ctx);
|
||||
|
||||
MCTargetStreamer *createARMNullTargetStreamer(MCStreamer &S);
|
||||
|
||||
MCCodeEmitter *createARMLEMCCodeEmitter(const MCInstrInfo &MCII,
|
||||
|
@ -130,10 +130,8 @@ createMCAsmStreamer(MCContext &Ctx, formatted_raw_ostream &OS,
|
||||
return S;
|
||||
}
|
||||
|
||||
static MCStreamer *createMipsNullStreamer(MCContext &Ctx) {
|
||||
MCStreamer *S = llvm::createNullStreamer(Ctx);
|
||||
new MipsTargetStreamer(*S);
|
||||
return S;
|
||||
static MCTargetStreamer *createMipsNullTargetStreamer(MCStreamer &S) {
|
||||
return new MipsTargetStreamer(S);
|
||||
}
|
||||
|
||||
extern "C" void LLVMInitializeMipsTargetMC() {
|
||||
@ -190,11 +188,14 @@ extern "C" void LLVMInitializeMipsTargetMC() {
|
||||
TargetRegistry::RegisterAsmStreamer(TheMips64Target, createMCAsmStreamer);
|
||||
TargetRegistry::RegisterAsmStreamer(TheMips64elTarget, createMCAsmStreamer);
|
||||
|
||||
TargetRegistry::RegisterNullStreamer(TheMipsTarget, createMipsNullStreamer);
|
||||
TargetRegistry::RegisterNullStreamer(TheMipselTarget, createMipsNullStreamer);
|
||||
TargetRegistry::RegisterNullStreamer(TheMips64Target, createMipsNullStreamer);
|
||||
TargetRegistry::RegisterNullStreamer(TheMips64elTarget,
|
||||
createMipsNullStreamer);
|
||||
TargetRegistry::RegisterNullTargetStreamer(TheMipsTarget,
|
||||
createMipsNullTargetStreamer);
|
||||
TargetRegistry::RegisterNullTargetStreamer(TheMipselTarget,
|
||||
createMipsNullTargetStreamer);
|
||||
TargetRegistry::RegisterNullTargetStreamer(TheMips64Target,
|
||||
createMipsNullTargetStreamer);
|
||||
TargetRegistry::RegisterNullTargetStreamer(TheMips64elTarget,
|
||||
createMipsNullTargetStreamer);
|
||||
|
||||
// Register the asm backend.
|
||||
TargetRegistry::RegisterMCAsmBackend(TheMipsTarget,
|
||||
|
Loading…
Reference in New Issue
Block a user