[llvm] r272458 - Use const_cast to cast away constness. This silences a warning.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 11 01:01:57 PDT 2016
Author: chandlerc
Date: Sat Jun 11 03:01:57 2016
New Revision: 272458
URL: http://llvm.org/viewvc/llvm-project?rev=272458&view=rev
Log:
Use const_cast to cast away constness. This silences a warning.
Modified:
llvm/trunk/lib/CodeGen/RegUsageInfoCollector.cpp
Modified: llvm/trunk/lib/CodeGen/RegUsageInfoCollector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegUsageInfoCollector.cpp?rev=272458&r1=272457&r2=272458&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegUsageInfoCollector.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegUsageInfoCollector.cpp Sat Jun 11 03:01:57 2016
@@ -87,7 +87,7 @@ void RegUsageInfoCollector::getAnalysisU
bool RegUsageInfoCollector::runOnMachineFunction(MachineFunction &MF) {
MachineRegisterInfo *MRI = &MF.getRegInfo();
TargetRegisterInfo *TRI =
- (TargetRegisterInfo *)MF.getSubtarget().getRegisterInfo();
+ const_cast<TargetRegisterInfo *>(MF.getSubtarget().getRegisterInfo());
const TargetMachine &TM = MF.getTarget();
DEBUG(dbgs() << " -------------------- " << getPassName()
More information about the llvm-commits
mailing list