lower_to_llvm.h 705 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. #ifndef CARBON_TOOLCHAIN_LOWERING_LOWER_TO_LLVM_H_
  5. #define CARBON_TOOLCHAIN_LOWERING_LOWER_TO_LLVM_H_
  6. #include "llvm/IR/LLVMContext.h"
  7. #include "llvm/IR/Module.h"
  8. #include "toolchain/semantics/semantics_ir.h"
  9. namespace Carbon {
  10. // Lowers Semantics IR to LLVM IR.
  11. auto LowerToLLVM(llvm::LLVMContext& llvm_context, llvm::StringRef module_name,
  12. const SemanticsIR& semantics_ir)
  13. -> std::unique_ptr<llvm::Module>;
  14. } // namespace Carbon
  15. #endif // CARBON_TOOLCHAIN_LOWERING_LOWER_TO_LLVM_H_