Explicitly initialize Instruction::block.

This commit is contained in:
Dejan Mircevski 2016-01-19 14:08:32 -05:00
parent a7e734962e
commit 34bc6c3896

View File

@ -77,8 +77,8 @@ const MemorySemanticsMask MemorySemanticsAllMemory = (MemorySemanticsMask)0x3FF;
class Instruction { class Instruction {
public: public:
Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode) { } Instruction(Id resultId, Id typeId, Op opCode) : resultId(resultId), typeId(typeId), opCode(opCode), block(nullptr) { }
explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode) { } explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { }
virtual ~Instruction() {} virtual ~Instruction() {}
void addIdOperand(Id id) { operands.push_back(id); } void addIdOperand(Id id) { operands.push_back(id); }
void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); } void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); }