mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Codegen: Given a carbon file prints the assembly to the stdout (#2944)
Co-authored-by: Farzana Ahmed Siddique <fasiddique@google.com>
This commit is contained in:
co-authored by
Farzana Ahmed Siddique
parent
b908c6e274
commit
aad4ed2083
@@ -0,0 +1,22 @@
|
||||
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#ifndef CARBON_TOOLCHAIN_CODEGEN_CODEGEN_H_
|
||||
#define CARBON_TOOLCHAIN_CODEGEN_CODEGEN_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "llvm/IR/Module.h"
|
||||
|
||||
namespace Carbon {
|
||||
// Prints the assembly to stdout for the given llvm module.
|
||||
// If print fails, this returns false and any information about the failure is
|
||||
// printed to the error stream.
|
||||
auto PrintAssemblyFromModule(llvm::Module& module,
|
||||
llvm::StringRef target_triple,
|
||||
llvm::raw_pwrite_stream& error_stream,
|
||||
llvm::raw_pwrite_stream& output_stream) -> bool;
|
||||
} // namespace Carbon
|
||||
|
||||
#endif // CARBON_TOOLCHAIN_CODEGEN_CODEGEN_H_
|
||||
Reference in New Issue
Block a user