From bc2f4fb6910aa70db557939cb3497986e9cb1fad Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 12 Jun 2016 13:32:23 +0000 Subject: [PATCH] [RegUsageInfoCollector] Drop unneccesary const_cast. NFC. llvm-svn: 272509 --- llvm/lib/CodeGen/RegUsageInfoCollector.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/RegUsageInfoCollector.cpp b/llvm/lib/CodeGen/RegUsageInfoCollector.cpp index 5b17908d6e9d..aee632456929 100644 --- a/llvm/lib/CodeGen/RegUsageInfoCollector.cpp +++ b/llvm/lib/CodeGen/RegUsageInfoCollector.cpp @@ -86,8 +86,7 @@ void RegUsageInfoCollector::getAnalysisUsage(AnalysisUsage &AU) const { bool RegUsageInfoCollector::runOnMachineFunction(MachineFunction &MF) { MachineRegisterInfo *MRI = &MF.getRegInfo(); - TargetRegisterInfo *TRI = - const_cast(MF.getSubtarget().getRegisterInfo()); + const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo(); const TargetMachine &TM = MF.getTarget(); DEBUG(dbgs() << " -------------------- " << getPassName()