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

Philip Reames listmail at philipreames.com
Tue Dec 2 10:07:55 PST 2014


On 12/01/2014 09:17 PM, Philip Reames wrote:
> 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. 
This code was simply unnecessary.  It survived a previous refactoring 
when it shouldn't have.  I deleted it.  Sorry for the noise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141202/f77c5c17/attachment.html>


More information about the llvm-commits mailing list