From 09edb4716a07b8666620fa4f0cb06e185cccee1f Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 2 Jul 2024 00:45:21 +0800 Subject: [PATCH] Remove unused code --- .gitignore | 3 --- src/type_checker.cpp | 10 ---------- test/Makefile | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index c3a45a7e..1502847e 100644 --- a/.gitignore +++ b/.gitignore @@ -47,9 +47,6 @@ lex.yy.* # QBE IR files *.ssa -# LLVM test source files -*_llvm.c - # LLVM IR files *.ll diff --git a/src/type_checker.cpp b/src/type_checker.cpp index bd3eb84a..d767db24 100644 --- a/src/type_checker.cpp +++ b/src/type_checker.cpp @@ -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>{}; param_types.emplace_back(std::make_unique(PrimitiveType::kInt)); @@ -245,15 +244,6 @@ void TypeChecker::InstallBuiltins_(ScopeStack& env) { std::make_unique(PrimitiveType::kInt), std::move(param_types))); env.AddSymbol(std::move(symbol), ScopeKind::kFile); - - auto param_types_printf = std::vector>{}; - param_types_printf.emplace_back( - std::make_unique(PrimitiveType::kInt)); - auto symbol_printf = std::make_unique( - "printf", std::make_unique( - std::make_unique(PrimitiveType::kInt), - std::move(param_types_printf))); - env.AddSymbol(std::move(symbol_printf), ScopeKind::kFile); } void TypeChecker::Visit(ExternDeclNode& extern_decl) { diff --git a/test/Makefile b/test/Makefile index 72062717..b0473c3f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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