lower.cpp 708 B

1234567891011121314151617181920
  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. #include "toolchain/lower/lower.h"
  5. #include "toolchain/lower/file_context.h"
  6. namespace Carbon::Lower {
  7. auto LowerToLLVM(llvm::LLVMContext& llvm_context, llvm::StringRef module_name,
  8. const SemIR::File& sem_ir, const SemIR::InstNamer* inst_namer,
  9. llvm::raw_ostream* vlog_stream)
  10. -> std::unique_ptr<llvm::Module> {
  11. FileContext context(llvm_context, module_name, sem_ir, inst_namer,
  12. vlog_stream);
  13. return context.Run();
  14. }
  15. } // namespace Carbon::Lower