A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/CIRGenAction_8cpp_source.html below:

clang: lib/CIR/FrontendAction/CIRGenAction.cpp Source File

10#include "mlir/IR/MLIRContext.h" 11#include "mlir/IR/OwningOpRef.h" 16#include "llvm/IR/Module.h" 19using namespace clang

;

28 "Unsupported output type for getBackendActionFromOutputType!"

);

31 return

BackendAction::Backend_EmitLL;

35

llvm_unreachable(

"Unsupported output type!"

);

38static

std::unique_ptr<llvm::Module>

45 virtual void

anchor();

51

std::unique_ptr<raw_pwrite_stream> OutputStream;

55

std::unique_ptr<CIRGenerator> Gen;

59

std::unique_ptr<raw_pwrite_stream> OS)

60

: Action(Action), CI(CI), OutputStream(

std

::move(OS)),

61

FS(&CI.getVirtualFileSystem()),

63

CI.getCodeGenOpts())) {}

66

assert(!Context &&

"initialized multiple times"

);

72

Gen->HandleTopLevelDecl(

D

);

77

Gen->HandleTranslationUnit(

C

);

78

mlir::ModuleOp MlirModule = Gen->getModule();

81 if

(OutputStream && MlirModule) {

82

mlir::OpPrintingFlags Flags;

83

Flags.enableDebugInfo(

true

,

false

);

84

MlirModule->print(*OutputStream, Flags);

88

llvm::LLVMContext LLVMCtx;

89

std::unique_ptr<llvm::Module> LLVMModule =

95

LLVMModule.get(), BEAction, FS, std::move(OutputStream));

103void

CIRGenConsumer::anchor() {}

106

: MLIRCtx(MLIRCtx ? MLIRCtx : new

mlir

::MLIRContext), Action(Act) {}

110static

std::unique_ptr<raw_pwrite_stream>

119

llvm_unreachable(

"Invalid CIRGenAction::OutputType"

);

122

std::unique_ptr<ASTConsumer>

130

std::make_unique<cir::CIRGenConsumer>(

Action

, CI, std::move(Out));

135void

EmitCIRAction::anchor() {}

139void

EmitLLVMAction::anchor() {}

static std::unique_ptr< raw_pwrite_stream > getOutputStream(CompilerInstance &CI, StringRef InFile, CIRGenAction::OutputType Action)

CIRGenAction(OutputType Action, mlir::MLIRContext *MLIRCtx=nullptr)

std::unique_ptr< clang::ASTConsumer > CreateASTConsumer(clang::CompilerInstance &CI, llvm::StringRef InFile) override

void Initialize(ASTContext &Ctx) override

Initialize - This is called to initialize the consumer, providing the ASTContext.

bool HandleTopLevelDecl(DeclGroupRef D) override

HandleTopLevelDecl - Handle the specified top-level declaration.

void HandleTranslationUnit(ASTContext &C) override

HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been par...

CIRGenConsumer(CIRGenAction::OutputType Action, CompilerInstance &CI, std::unique_ptr< raw_pwrite_stream > OS)

EmitCIRAction(mlir::MLIRContext *MLIRCtx=nullptr)

EmitLLVMAction(mlir::MLIRContext *MLIRCtx=nullptr)

ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

CompilerInstance - Helper class for managing a single instance of the Clang compiler.

std::unique_ptr< raw_pwrite_stream > createDefaultOutputFile(bool Binary=true, StringRef BaseInput="", StringRef Extension="", bool RemoveFileOnSignal=true, bool CreateMissingDirectories=false, bool ForceUseTemporary=false)

Create the default output file (from the invocation's options) and add it to the list of tracked outp...

std::unique_ptr< llvm::raw_pwrite_stream > takeOutputStream()

CodeGenOptions & getCodeGenOpts()

std::unique_ptr< llvm::Module > lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule, llvm::LLVMContext &llvmCtx)

static BackendAction getBackendActionFromOutputType(CIRGenAction::OutputType Action)

static std::unique_ptr< llvm::Module > lowerFromCIRToLLVMIR(mlir::ModuleOp MLIRModule, llvm::LLVMContext &LLVMCtx)

The JSON file list parser is used to communicate input to InstallAPI.

void emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts, StringRef TDesc, llvm::Module *M, BackendAction Action, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS, std::unique_ptr< raw_pwrite_stream > OS, BackendConsumer *BC=nullptr)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4