raise character limit to 120
This commit is contained in:
@@ -22,8 +22,7 @@ namespace obelisk
|
||||
void setArgs(std::vector<std::unique_ptr<ExpressionAST>> args);
|
||||
|
||||
public:
|
||||
CallExpressionAST(const std::string &callee,
|
||||
std::vector<std::unique_ptr<ExpressionAST>> args) :
|
||||
CallExpressionAST(const std::string &callee, std::vector<std::unique_ptr<ExpressionAST>> args) :
|
||||
callee_(callee),
|
||||
args_(std::move(args))
|
||||
{
|
||||
|
||||
@@ -17,8 +17,7 @@ llvm::Function *obelisk::FunctionAST::codegen()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
llvm::BasicBlock *bB
|
||||
= llvm::BasicBlock::Create(*TheContext, "entry", theFunction);
|
||||
llvm::BasicBlock *bB = llvm::BasicBlock::Create(*TheContext, "entry", theFunction);
|
||||
Builder->SetInsertPoint(bB);
|
||||
|
||||
NamedValues.clear();
|
||||
|
||||
@@ -18,8 +18,7 @@ namespace obelisk
|
||||
void setPrototype(std::unique_ptr<PrototypeAST> prototype);
|
||||
|
||||
public:
|
||||
FunctionAST(std::unique_ptr<PrototypeAST> prototype,
|
||||
std::unique_ptr<ExpressionAST> body) :
|
||||
FunctionAST(std::unique_ptr<PrototypeAST> prototype, std::unique_ptr<ExpressionAST> body) :
|
||||
prototype_(std::move(prototype)),
|
||||
body_(std::move(body))
|
||||
{
|
||||
|
||||
@@ -3,17 +3,10 @@
|
||||
|
||||
llvm::Function *obelisk::PrototypeAST::codegen()
|
||||
{
|
||||
std::vector<llvm::Type *> doubles(args_.size(),
|
||||
llvm::Type::getDoubleTy(*TheContext));
|
||||
llvm::FunctionType *FT
|
||||
= llvm::FunctionType::get(llvm::Type::getDoubleTy(*TheContext),
|
||||
doubles,
|
||||
false);
|
||||
std::vector<llvm::Type *> doubles(args_.size(), llvm::Type::getDoubleTy(*TheContext));
|
||||
llvm::FunctionType *FT = llvm::FunctionType::get(llvm::Type::getDoubleTy(*TheContext), doubles, false);
|
||||
|
||||
llvm::Function *F = llvm::Function::Create(FT,
|
||||
llvm::Function::ExternalLinkage,
|
||||
name_,
|
||||
obelisk::TheModule.get());
|
||||
llvm::Function *F = llvm::Function::Create(FT, llvm::Function::ExternalLinkage, name_, obelisk::TheModule.get());
|
||||
|
||||
unsigned idx = 0;
|
||||
for (auto &arg : F->args())
|
||||
|
||||
@@ -19,8 +19,7 @@ namespace obelisk
|
||||
void setArgs(std::vector<std::string> args);
|
||||
|
||||
public:
|
||||
PrototypeAST(const std::string& name,
|
||||
std::vector<std::string> args) :
|
||||
PrototypeAST(const std::string& name, std::vector<std::string> args) :
|
||||
name_(name),
|
||||
args_(std::move(args))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user