Fixed exception and removed scripts

This commit is contained in:
Rafał Grodziński
2025-06-21 17:34:05 +09:00
parent 1da1622b8a
commit ac6f3c449a
4 changed files with 9 additions and 18 deletions

View File

@@ -1,6 +0,0 @@
#!/bin/bash
rm -f brb
rm -f *.o
rm -f *.asm
rm -rf *.dSYM

View File

@@ -1,6 +0,0 @@
#!/bin/bash
IFLAGS="-I/usr/local/opt/llvm/include -I/opt/homebrew/opt/llvm/include"
LDFLAGS="-L/usr/local/opt/llvm/lib -L/opt/homebrew/opt/llvm/lib"
cc -g -std=c++17 -lc++ -lllvm -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1 ${LDFLAGS} ${IFLAGS} src/*.cpp -o brb

View File

@@ -149,10 +149,13 @@ string StatementReturn::toString(int indent) {
string value; string value;
for (int ind=0; ind<indent; ind++) for (int ind=0; ind<indent; ind++)
value += " "; value += " ";
value += "RETURN:\n"; value += "RETURN";
for (int ind=0; ind<indent+1; ind++) if (expression != nullptr) {
value += " "; value += ":\n";
value += expression->toString(indent+1); for (int ind=0; ind<indent+1; ind++)
value += " ";
value += expression->toString(indent+1);
}
value += "\n"; value += "\n";
return value; return value;
} }

View File

@@ -80,8 +80,8 @@ int main(int argc, char **argv) {
module->print(llvm::outs(), nullptr); module->print(llvm::outs(), nullptr);
} }
//CodeGenerator codeGenerator(module); CodeGenerator codeGenerator(module);
//codeGenerator.generateObjectFile(outputKind); codeGenerator.generateObjectFile(outputKind);
return 0; return 0;
} }