codegen.h 849 B

12345678910111213141516171819202122
  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_CODEGEN_CODEGEN_H_
  5. #define CARBON_TOOLCHAIN_CODEGEN_CODEGEN_H_
  6. #include <cstdint>
  7. #include "llvm/IR/Module.h"
  8. namespace Carbon {
  9. // Prints the assembly to stdout for the given llvm module.
  10. // If print fails, this returns false and any information about the failure is
  11. // printed to the error stream.
  12. auto PrintAssemblyFromModule(llvm::Module& module,
  13. llvm::StringRef target_triple,
  14. llvm::raw_pwrite_stream& error_stream,
  15. llvm::raw_pwrite_stream& output_stream) -> bool;
  16. } // namespace Carbon
  17. #endif // CARBON_TOOLCHAIN_CODEGEN_CODEGEN_H_