Ralph Corderoy
2006-Aug-17 10:11 UTC
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Hi Chris,> On Wed, 16 Aug 2006, Anton Vayvod wrote: > > I'm willing :) I don't know how to do it. What's "to put together a > > patch"? :) > > In your local CVS tree, change the methods to be const, and adjust any > code that is neccesary for that to work. Once that is done, from the > top level, type 'cvs diff -u >& patch.txt' and attach patch.txt to an > email. > > If you're using sh instead of csh, use 'cvs diff -u 2>&1 > patch.txt'.The sh equivalent of that csh is cvs diff -u >patch.txt 2>&1 The first duplicates stderr onto stdout and then changes stdout to be patch.txt leaving stderr to go to wherever stdout used to go. The second changes stdout to be patch.txt and then duplicates stderr to go there too. This flexibility is one of sh's advantages over csh. ;-) Cheers, Ralph.
Anton Vayvod
2006-Aug-17 16:34 UTC
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
Thanks, Ralph, this line worked well :) Here it is, my first patch to LLVM :) I've changed all allocation_order_begin() and allocation_order_end() methods to take const MachineFunction &MF as a parameter. I also added const version of MachineFunction::getInfo<Ty>() method. And I changed three static hasFP() functions to take const reference to MachineFunction. 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? Thanks, Tony. P.S. I've updated llvm from CVS about 20 hour ago. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060817/1994fbb8/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.zip Type: application/zip Size: 5737 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20060817/1994fbb8/attachment.zip>
Chris Lattner
2006-Aug-17 22:13 UTC
[LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
On Thu, 17 Aug 2006, Anton Vayvod wrote:> Thanks, Ralph, this line worked well :) > Here it is, my first patch to LLVM :)> I've changed all allocation_order_begin() and allocation_order_end() methods > to take const MachineFunction &MF as a parameter. I also added const version > of MachineFunction::getInfo<Ty>() method. And I changed three static hasFP() > functions to take const reference to MachineFunction.Looks great, applied: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036832.html ... http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060814/036839.html> 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 -- http://nondot.org/sabre/ http://llvm.org/
Seemingly Similar Threads
- [LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
- [LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
- [LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
- [LLVMdev] allocation_order_begin takes non-const reference for MachineFunction
- [LLVMdev] allocation_order_begin takes non-const reference for MachineFunction