Remove unnecessary cast that was also unnecessarily casting away constness.
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 21 Aug 2012 18:54:23 +0000 (18:54 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 21 Aug 2012 18:54:23 +0000 (18:54 +0000)
Even looking at the revision history I couldn't quite piece together why this
cast was ever written in the first place, but I assume it was because of some
change in the inheritance, perhaps this function was reimplemented in a
derived type & this caller was meant to get the base version (& it wasn't
virtual)?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162301 91177308-0d34-0410-b5e6-96231b3b80d8

foo [new file with mode: 0644]
lib/CodeGen/RegAllocGreedy.cpp

diff --git a/foo b/foo
new file mode 100644 (file)
index 0000000..e69de29
index 6ac542860501d8a3c89b1a4868bba954e92e0838..d0cff481cbf765fb0ab59180c0f0650c9e65f61a 100644 (file)
@@ -1747,7 +1747,7 @@ unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg,
 bool RAGreedy::runOnMachineFunction(MachineFunction &mf) {
   DEBUG(dbgs() << "********** GREEDY REGISTER ALLOCATION **********\n"
                << "********** Function: "
-               << ((Value*)mf.getFunction())->getName() << '\n');
+               << mf.getFunction()->getName() << '\n');
 
   MF = &mf;
   if (VerifyEnabled)