[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Reid Spencer
rspencer at reidspencer.com
Wed Aug 16 08:37:27 PDT 2006
Hi Tony,
It doesn't look right to me either. The "begin" and "end" methods which
allocation_order_begin should return a const_iterator instead of an
iterator. Those methods are "const". And, yes, the MachineFunction
reference isn't even used so at the very least it could be const (if not
removed). However, I'm not an expert in this area of the code. Chris or
someone else will have to look at this and provide a determination.
Reid.
On Wed, 2006-08-16 at 18:14 +0400, Anton Vayvod wrote:
> Hi!
>
> Could someone tell me the reason why allocation_order_begin method of
> TargetRegisterClass class takes a non-const reference to
> MachineFunction? I can't imagine why this method will change function
> and didn't find any override within llvm source which uses non-const
> methods of the MF parameter.
>
> Just run into compiler error because I passed a const reference to the
> method.
>
> Best regards,
>
> Tony.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list