lower.h 961 B

12345678910111213141516171819202122232425262728
  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_LOWER_LOWER_H_
  5. #define CARBON_TOOLCHAIN_LOWER_LOWER_H_
  6. #include "llvm/ADT/ArrayRef.h"
  7. #include "llvm/IR/LLVMContext.h"
  8. #include "llvm/IR/Module.h"
  9. #include "toolchain/lower/options.h"
  10. #include "toolchain/parse/tree_and_subtrees.h"
  11. #include "toolchain/sem_ir/file.h"
  12. #include "toolchain/sem_ir/inst_namer.h"
  13. namespace Carbon::Lower {
  14. // Lowers SemIR to LLVM IR.
  15. auto LowerToLLVM(
  16. llvm::LLVMContext& llvm_context,
  17. llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs,
  18. const Parse::GetTreeAndSubtreesStore& tree_and_subtrees_getters,
  19. const SemIR::File& sem_ir, int total_ir_count,
  20. const LowerToLLVMOptions& options) -> std::unique_ptr<llvm::Module>;
  21. } // namespace Carbon::Lower
  22. #endif // CARBON_TOOLCHAIN_LOWER_LOWER_H_