lower.h 954 B

1234567891011121314151617181920212223242526
  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/IR/LLVMContext.h"
  7. #include "llvm/IR/Module.h"
  8. #include "toolchain/check/sem_ir_diagnostic_converter.h"
  9. #include "toolchain/sem_ir/file.h"
  10. #include "toolchain/sem_ir/inst_namer.h"
  11. namespace Carbon::Lower {
  12. // Lowers SemIR to LLVM IR.
  13. auto LowerToLLVM(llvm::LLVMContext& llvm_context, bool include_debug_info,
  14. const Check::SemIRDiagnosticConverter& converter,
  15. llvm::StringRef module_name, const SemIR::File& sem_ir,
  16. const SemIR::InstNamer* inst_namer,
  17. llvm::raw_ostream* vlog_stream)
  18. -> std::unique_ptr<llvm::Module>;
  19. } // namespace Carbon::Lower
  20. #endif // CARBON_TOOLCHAIN_LOWER_LOWER_H_