Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
leewei05 committed Jul 1, 2024
1 parent 6c9f9c9 commit 09edb47
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ lex.yy.*
# QBE IR files
*.ssa

# LLVM test source files
*_llvm.c

# LLVM IR files
*.ll

Expand Down
10 changes: 0 additions & 10 deletions src/type_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ void TypeChecker::Visit(CompoundStmtNode& compound_stmt) {
void TypeChecker::InstallBuiltins_(ScopeStack& env) {
// The supported builtins are:
// - int __builtin_print(int)
// - int printf(int)

auto param_types = std::vector<std::unique_ptr<Type>>{};
param_types.emplace_back(std::make_unique<PrimType>(PrimitiveType::kInt));
Expand All @@ -245,15 +244,6 @@ void TypeChecker::InstallBuiltins_(ScopeStack& env) {
std::make_unique<PrimType>(PrimitiveType::kInt),
std::move(param_types)));
env.AddSymbol(std::move(symbol), ScopeKind::kFile);

auto param_types_printf = std::vector<std::unique_ptr<Type>>{};
param_types_printf.emplace_back(
std::make_unique<PrimType>(PrimitiveType::kInt));
auto symbol_printf = std::make_unique<SymbolEntry>(
"printf", std::make_unique<FuncType>(
std::make_unique<PrimType>(PrimitiveType::kInt),
std::move(param_types_printf)));
env.AddSymbol(std::move(symbol_printf), ScopeKind::kFile);
}

void TypeChecker::Visit(ExternDeclNode& extern_decl) {
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ test:


clean:
rm -f *.s **/*.s *.o **/*.o *.ssa **/*.ssa **/*.ll **/*_llvm.c
rm -f *.s **/*.s *.o **/*.o *.ssa **/*.ssa **/*.ll

0 comments on commit 09edb47

Please sign in to comment.