lower_to_llvm.cpp 658 B

12345678910111213141516171819
  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/lowering/lower_to_llvm.h"
  5. #include "toolchain/lowering/lowering_context.h"
  6. namespace Carbon {
  7. auto LowerToLLVM(llvm::LLVMContext& llvm_context, llvm::StringRef module_name,
  8. const SemanticsIR& semantics_ir,
  9. llvm::raw_ostream* vlog_stream)
  10. -> std::unique_ptr<llvm::Module> {
  11. LoweringContext context(llvm_context, module_name, semantics_ir, vlog_stream);
  12. return context.Run();
  13. }
  14. } // namespace Carbon