From d36e04cb6c2f308d6789f841a7155334aca7d688 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Tue, 14 Feb 2017 05:15:24 +0000 Subject: [PATCH] [RISCV] Fix unused variable in RISCVMCTargetDesc. NFC Also, for better uniformity use TargetRegistry::RegisterMCAsmInfo rather than RegisterMCAsmInfoFn. Again, no functional change. llvm-svn: 295026 --- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp index 4fc69a7fcaba..41be0a2084b3 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp @@ -44,13 +44,12 @@ static MCRegisterInfo *createRISCVMCRegisterInfo(const Triple &TT) { static MCAsmInfo *createRISCVMCAsmInfo(const MCRegisterInfo &MRI, const Triple &TT) { - MCAsmInfo *MAI = new RISCVMCAsmInfo(TT); - return MAI; + return new RISCVMCAsmInfo(TT); } extern "C" void LLVMInitializeRISCVTargetMC() { for (Target *T : {&getTheRISCV32Target(), &getTheRISCV64Target()}) { - RegisterMCAsmInfoFn X(*T, createRISCVMCAsmInfo); + TargetRegistry::RegisterMCAsmInfo(*T, createRISCVMCAsmInfo); TargetRegistry::RegisterMCInstrInfo(*T, createRISCVMCInstrInfo); TargetRegistry::RegisterMCRegInfo(*T, createRISCVMCRegisterInfo); TargetRegistry::RegisterMCAsmBackend(*T, createRISCVAsmBackend);