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

Craig Topper craig.topper at gmail.com
Tue Aug 21 13:14:00 PDT 2012


I think the other register allocators have the same cast and should be
fixed too.

On Tue, Aug 21, 2012 at 11:54 AM, David Blaikie <dblaikie at gmail.com> wrote:

> 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)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120821/c195c8d9/attachment.html>


More information about the llvm-commits mailing list