File indexing completed on 2026-05-10 08:36:51
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_CLANG_CODEGEN_BACKENDUTIL_H
0010 #define LLVM_CLANG_CODEGEN_BACKENDUTIL_H
0011
0012 #include "clang/Basic/LLVM.h"
0013 #include "llvm/IR/ModuleSummaryIndex.h"
0014 #include <memory>
0015
0016 namespace llvm {
0017 class BitcodeModule;
0018 template <typename T> class Expected;
0019 template <typename T> class IntrusiveRefCntPtr;
0020 class Module;
0021 class MemoryBufferRef;
0022 namespace vfs {
0023 class FileSystem;
0024 }
0025 }
0026
0027 namespace clang {
0028 class CompilerInstance;
0029 class DiagnosticsEngine;
0030 class CodeGenOptions;
0031 class BackendConsumer;
0032
0033 enum BackendAction {
0034 Backend_EmitAssembly,
0035 Backend_EmitBC,
0036 Backend_EmitLL,
0037 Backend_EmitNothing,
0038 Backend_EmitMCNull,
0039 Backend_EmitObj
0040 };
0041
0042 void emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts,
0043 StringRef TDesc, llvm::Module *M, BackendAction Action,
0044 llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
0045 std::unique_ptr<raw_pwrite_stream> OS,
0046 BackendConsumer *BC = nullptr);
0047
0048 void EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts,
0049 llvm::MemoryBufferRef Buf);
0050
0051 void EmbedObject(llvm::Module *M, const CodeGenOptions &CGOpts,
0052 DiagnosticsEngine &Diags);
0053 }
0054
0055 #endif