raise character limit to 120

This commit is contained in:
2022-12-13 17:35:14 -03:00
parent 74de3c67c0
commit 1f2500a037
17 changed files with 51 additions and 128 deletions

View File

@@ -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))
{

View File

@@ -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();

View File

@@ -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))
{

View File

@@ -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())

View File

@@ -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))
{