Change some runtime names

This commit is contained in:
Paweł Bylica 2014-10-28 10:32:10 +01:00
parent fd7b6da606
commit e273299a09
2 changed files with 2 additions and 1 deletions

View file

@ -172,6 +172,7 @@ std::unique_ptr<llvm::Module> Compiler::compile(bytesConstRef bytecode)
llvm::Type* mainFuncArgTypes[] = {m_builder.getInt32Ty(), Type::RuntimePtr}; // There must be int in first place because LLVM does not support other signatures llvm::Type* mainFuncArgTypes[] = {m_builder.getInt32Ty(), Type::RuntimePtr}; // There must be int in first place because LLVM does not support other signatures
auto mainFuncType = llvm::FunctionType::get(Type::MainReturn, mainFuncArgTypes, false); auto mainFuncType = llvm::FunctionType::get(Type::MainReturn, mainFuncArgTypes, false);
m_mainFunc = llvm::Function::Create(mainFuncType, llvm::Function::ExternalLinkage, "main", module.get()); m_mainFunc = llvm::Function::Create(mainFuncType, llvm::Function::ExternalLinkage, "main", module.get());
m_mainFunc->arg_begin()->getNextNode()->setName("rt");
// Create the basic blocks. // Create the basic blocks.
auto entryBlock = llvm::BasicBlock::Create(m_builder.getContext(), "entry", m_mainFunc); auto entryBlock = llvm::BasicBlock::Create(m_builder.getContext(), "entry", m_mainFunc);

View file

@ -27,7 +27,7 @@ llvm::StructType* RuntimeData::getType()
Type::BytePtr, Type::BytePtr,
Type::BytePtr Type::BytePtr
}; };
type = llvm::StructType::create(elems, "RuntimeData"); type = llvm::StructType::create(elems, "Runtime");
} }
return type; return type;
} }