diff options
Diffstat (limited to 'compiler/sea_ir/code_gen.cc')
-rw-r--r-- | compiler/sea_ir/code_gen.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/sea_ir/code_gen.cc b/compiler/sea_ir/code_gen.cc index 0ef21b4800..7fd6c86c8c 100644 --- a/compiler/sea_ir/code_gen.cc +++ b/compiler/sea_ir/code_gen.cc @@ -114,6 +114,14 @@ void CodeGenVisitor::Visit(InstructionNode* instruction) { std::string instr = instruction->GetInstruction()->DumpString(NULL); DCHECK(0); // This whole function is useful only during development. } + +void CodeGenVisitor::Visit(UnnamedConstInstructionNode* instruction) { + std::string instr = instruction->GetInstruction()->DumpString(NULL); + std::cout << "1.Instruction: " << instr << std::endl; + llvm_data_->AddValue(instruction, + llvm::ConstantInt::get(*llvm_data_->context_, llvm::APInt(32, instruction->GetConstValue()))); +} + void CodeGenVisitor::Visit(ConstInstructionNode* instruction) { std::string instr = instruction->GetInstruction()->DumpString(NULL); std::cout << "1.Instruction: " << instr << std::endl; |