search for: constinst

Displaying 2 results from an estimated 2 matches for "constinst".

Did you mean: constint
2012 Feb 16
2
[LLVMdev] Question about "const"
...ways: 1. Templates. template <class InstructionTy> class InstructionProcessorT { InstructionTy *Inst; InstructionProcessor(InstructionTy *I) : Inst(I) {} // }; typedef InstructionProcessorT<Instruction> InstructionProcessor; typedef InstructionProcessorT<const Instruction> ConstInstructionProcessor; 2. Unions. class InstructionProcessor { union { const Instruction *ConstInst; Instruction *Inst; } InstructionProcessor(Instruction *I) : Inst(I) {} InstructionProcessor(const Instruction *I) : ConstInst(I) {} void someMethod(); // Will work with Inst. void...
2012 Feb 16
0
[LLVMdev] Question about "const"
...ways: 1. Templates. template <class InstructionTy> class InstructionProcessorT { InstructionTy *Inst; InstructionProcessor(InstructionTy *I) : Inst(I) {} // }; typedef InstructionProcessorT<Instruction> InstructionProcessor; typedef InstructionProcessorT<const Instruction> ConstInstructionProcessor; 2. Unions. class InstructionProcessor { union { const Instruction *ConstInst; Instruction *Inst; } InstructionProcessor(Instruction *I) : Inst(I) {} InstructionProcessor(const Instruction *I) : ConstInst(I) {} void someMethod(); // Will work with Inst. void...