Skip to content

Commit 03a04f2

Browse files
committed
Register MCInstrAnalysis for SystemZ to fix test errors
1 parent e45cec8 commit 03a04f2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "llvm/MC/MCContext.h"
1616
#include "llvm/MC/MCDwarf.h"
1717
#include "llvm/MC/MCInst.h"
18+
#include "llvm/MC/MCInstrAnalysis.h"
1819
#include "llvm/MC/MCInstrInfo.h"
1920
#include "llvm/MC/MCRegisterInfo.h"
2021
#include "llvm/MC/MCStreamer.h"
@@ -243,6 +244,10 @@ createNullTargetStreamer(MCStreamer &S) {
243244
return new SystemZTargetStreamer(S);
244245
}
245246

247+
static MCInstrAnalysis *createSystemZMCInstrAnalysis(const MCInstrInfo *Info) {
248+
return new MCInstrAnalysis(Info);
249+
}
250+
246251
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTargetMC() {
247252
// Register the MCAsmInfo.
248253
TargetRegistry::RegisterMCAsmInfo(getTheSystemZTarget(),
@@ -283,4 +288,8 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTargetMC() {
283288
// Register the null streamer
284289
TargetRegistry::RegisterNullTargetStreamer(getTheSystemZTarget(),
285290
createNullTargetStreamer);
291+
292+
// Register the MCInstrAnalysis.
293+
TargetRegistry::RegisterMCInstrAnalysis(getTheSystemZTarget(),
294+
createSystemZMCInstrAnalysis);
286295
}

0 commit comments

Comments
 (0)