search for: instructionprocessort

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

Did you mean: instructionprocessor
2012 Feb 16
2
[LLVMdev] Question about "const"
Hi all. I have a next problem. I need to implement some object that will work with both const and "constless" object: Instruction* and const Instruction*, for example. How to implement it better? Currently I see two possible 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 { cons...
2012 Feb 16
0
[LLVMdev] Question about "const"
...Hi all. I have a next problem. I need to implement some object that will work with both const and "constless" object: Instruction* and const Instruction*, for example. How to implement it better? Currently I see two possible 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 { cons...