[llvm] r295026 - [RISCV] Fix unused variable in RISCVMCTargetDesc. NFC
Alex Bradbury via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 21:15:25 PST 2017
Author: asb
Date: Mon Feb 13 23:15:24 2017
New Revision: 295026
URL: http://llvm.org/viewvc/llvm-project?rev=295026&view=rev
Log:
[RISCV] Fix unused variable in RISCVMCTargetDesc. NFC
Also, for better uniformity use TargetRegistry::RegisterMCAsmInfo rather than
RegisterMCAsmInfoFn. Again, no functional change.
Modified:
llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
Modified: llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp?rev=295026&r1=295025&r2=295026&view=diff
==============================================================================
--- llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.cpp Mon Feb 13 23:15:24 2017
@@ -44,13 +44,12 @@ static MCRegisterInfo *createRISCVMCRegi
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);
More information about the llvm-commits
mailing list