lower.cpp 770 B

123456789101112131415161718192021
  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, bool include_debug_info,
  8. llvm::StringRef module_name, const SemIR::File& sem_ir,
  9. const SemIR::InstNamer* inst_namer,
  10. llvm::raw_ostream* vlog_stream)
  11. -> std::unique_ptr<llvm::Module> {
  12. FileContext context(llvm_context, include_debug_info, module_name, sem_ir,
  13. inst_namer, vlog_stream);
  14. return context.Run();
  15. }
  16. } // namespace Carbon::Lower