Skip to content

Commit de018e4

Browse files
committed
Created default file
1 parent 570d8ed commit de018e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/utils/ArgsHandler.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const std::string BRAIN_HELP = "Use the identifier '--help' to get information \
1818
about the settings\n";
1919
const std::string BRAIN_OPT_ERR = "You can not use more than one type of \
2020
optimization at time.\n";
21+
const std::string BRAIN_DEFAULT_FILE_NAME = "a";
2122

2223
void ArgsHandler::handle(int argc, char **argv)
2324
{
@@ -29,6 +30,8 @@ void ArgsHandler::handle(int argc, char **argv)
2930
exit(-1);
3031
}
3132

33+
_file_name = BRAIN_DEFAULT_FILE_NAME;
34+
3235
for (int i = 1; i < argc; i++) {
3336
std::string str(argv[i]);
3437

src/utils/Bootstrap.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ int Bootstrap::init(int argc, char** argv)
6161
auto *module = Owner.get();
6262

6363
// Create the main function: "i32 @main()"
64-
auto *MainF = llvm::cast<llvm::Function>(module->getOrInsertFunction("main", llvm::Type::getInt32Ty(llvm_context), (llvm::Type *)0));
64+
auto *MainF = llvm::cast<llvm::Function>(module->getOrInsertFunction("main",
65+
llvm::Type::getInt32Ty(llvm_context),
66+
(llvm::Type *)0));
6567

6668
// Create the entry block
6769
auto *basic_block = llvm::BasicBlock::Create(llvm_context,

0 commit comments

Comments
 (0)