[llvm-commits] [llvm] r162301 - in /llvm/trunk: foo lib/CodeGen/RegAllocGreedy.cpp

David Blaikie dblaikie at gmail.com
Tue Aug 21 11:54:23 PDT 2012


Author: dblaikie
Date: Tue Aug 21 13:54:23 2012
New Revision: 162301

URL: http://llvm.org/viewvc/llvm-project?rev=162301&view=rev
Log:
Remove unnecessary cast that was also unnecessarily casting away constness.

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)?

Added:
    llvm/trunk/foo
Modified:
    llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp

Added: llvm/trunk/foo
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/foo?rev=162301&view=auto
==============================================================================
    (empty)

Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=162301&r1=162300&r2=162301&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Tue Aug 21 13:54:23 2012
@@ -1747,7 +1747,7 @@
 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)





More information about the llvm-commits mailing list