lower.h 788 B

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