Index: llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp =================================================================== --- llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp +++ llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp @@ -236,6 +236,11 @@ return new SystemZTargetELFStreamer(S); } +static MCTargetStreamer * +createNullTargetStreamer(MCStreamer &S) { + return new SystemZTargetStreamer(S); +} + extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTargetMC() { // Register the MCAsmInfo. TargetRegistry::RegisterMCAsmInfo(getTheSystemZTarget(), @@ -272,4 +277,8 @@ // Register the obj streamer TargetRegistry::RegisterObjectTargetStreamer(getTheSystemZTarget(), createObjectTargetStreamer); + + // Register the null streamer + TargetRegistry::RegisterNullTargetStreamer(getTheSystemZTarget(), + createNullTargetStreamer); } Index: llvm/lib/Target/SystemZ/SystemZTargetStreamer.h =================================================================== --- llvm/lib/Target/SystemZ/SystemZTargetStreamer.h +++ llvm/lib/Target/SystemZ/SystemZTargetStreamer.h @@ -48,7 +48,7 @@ void emitConstantPools() override; - virtual void emitMachine(StringRef CPU) = 0; + virtual void emitMachine(StringRef CPU) {}; }; } // end namespace llvm Index: llvm/test/CodeGen/SystemZ/memcpy-01.ll =================================================================== --- llvm/test/CodeGen/SystemZ/memcpy-01.ll +++ llvm/test/CodeGen/SystemZ/memcpy-01.ll @@ -1,6 +1,7 @@ ; Test memcpy using MVC. ; ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; RUN: llc -mtriple=s390x-linux-gnu -filetype=null %s declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind