check.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_TOOLCHAIN_CHECK_CHECK_H_
  5. #define CARBON_TOOLCHAIN_CHECK_CHECK_H_
  6. #include "common/ostream.h"
  7. #include "toolchain/diagnostics/diagnostic_emitter.h"
  8. #include "toolchain/lex/tokenized_buffer.h"
  9. #include "toolchain/parse/tree.h"
  10. #include "toolchain/sem_ir/file.h"
  11. namespace Carbon::Check {
  12. // Constructs builtins. A single instance should be reused with CheckParseTree
  13. // calls associated with a given compilation.
  14. inline auto MakeBuiltins() -> SemIR::File { return SemIR::File(); }
  15. // Produces and checks the IR for the provided Parse::Tree.
  16. extern auto CheckParseTree(const SemIR::File& builtin_ir,
  17. const Lex::TokenizedBuffer& tokens,
  18. const Parse::Tree& parse_tree,
  19. DiagnosticConsumer& consumer,
  20. llvm::raw_ostream* vlog_stream) -> SemIR::File;
  21. } // namespace Carbon::Check
  22. #endif // CARBON_TOOLCHAIN_CHECK_CHECK_H_