[LLVMdev] RFC: MachineInstr Annotations
David Greene
dag at cray.com
Mon Aug 3 09:14:26 PDT 2009
On Saturday 01 August 2009 15:20, Dan Gohman wrote:
> > unsigned short Flags; // ***NEW*** Various bits of
> > info
>
> Those bits are almost asking to be used ;-).
I'll rename them AsmPrinterFlags.
> I'm ok with this, in abstract. It would be good to put up some
> intimidating
> comments to scare people away from using these flags for anything
> except for the AsmPrinter, because semantics are tricky enough as they
> are right now without new subtle bits to worry about.
I agree.
> It even occurs to me to suggest putting the bits in a private member in
> a class and making AsmPrinter a friend of that class in order to
> discourage accidental misuse, but that may be overreacting :-).
I really don't like the idea of opening up all of MachineInstr's guts to
AsmPrinter. I wish C++ had a more selective concept of friend.
-Dave
More information about the llvm-dev
mailing list