[llvm] r223101 - Fix variable used only in assertion.

Philip Reames listmail at philipreames.com
Mon Dec 1 21:17:44 PST 2014


On 12/01/2014 07:18 PM, David Blaikie wrote:
>
>
> On Dec 1, 2014 5:10 PM, "Nick Lewycky" <nicholas at mxc.ca 
> <mailto:nicholas at mxc.ca>> wrote:
> >
> > Author: nicholas
> > Date: Mon Dec  1 19:09:56 2014
> > New Revision: 223101
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=223101&view=rev
> > Log:
> > Fix variable used only in assertion.
> >
> > Modified:
> >     llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
> >
> > Modified: llvm/trunk/lib/Target/X86/X86MCInstLower.cpp
> > URL: 
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCInstLower.cpp?rev=223101&r1=223100&r2=223101&view=diff
> > 
> ==============================================================================
> > --- llvm/trunk/lib/Target/X86/X86MCInstLower.cpp (original)
> > +++ llvm/trunk/lib/Target/X86/X86MCInstLower.cpp Mon Dec  1 19:09:56 
> 2014
> > @@ -816,8 +816,9 @@ static void LowerSTATEPOINT(MCStreamer &
> >    assert(Is64Bit && "Statepoint currently only supports X86-64");
> >
> >    // We need to record the frame size for stack walking
> > -  const MachineFunction* MF = MI.getParent()->getParent();
> > +  const MachineFunction *MF = MI.getParent()->getParent();
> >    assert(MF && "can't find machine function?");
> > +  (void)MF;
>
> Could we just roll the expression into the assertion? Seems simple enough.
>
(This was originally my change.)

I'll take a closer look tomorrow.  I need to remind myself why the 
assert is even needed if I'm not otherwise using the variable.  This may 
just be dead code.
>
> >
> >    //
> >    // Emit call instruction
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141201/405ac7c2/attachment.html>


More information about the llvm-commits mailing list