[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction

Anton Vayvod avayvod at gmail.com
Fri Aug 18 01:24:04 PDT 2006


>
> > While doing this I've found that some methods of MachineFunction are
> const
> > but return non-const pointers to MachineFunction internal info. Is that
> all
> > right?
>
> Which ones specifically?
>
> -Chris


Probable candidates are:
getSSARegMap, getFrameInfo, getJumpTableInfo, getConstantPool,
isPhysRegUsed, getBlockNumbered.

They are const but return non-const pointers to object's internal data.
Though I don't know if making two versions of each methods will be useful or
it'll just make code bigger and compilation a bit longer :)

isPhysRegUsed should be constified I suppose.

And btw comment to addToMMBNumbering method is a bit old (refers to
getNextMMBNumber, which doesn't exist already).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060818/cf1b45b7/attachment.html>


More information about the llvm-dev mailing list