14#ifndef CLANG_LIB_CIR_DIALECT_TRANSFORMS_TARGETLOWERING_LOWERMODULE_H
15#define CLANG_LIB_CIR_DIALECT_TRANSFORMS_TARGETLOWERING_LOWERMODULE_H
19#include "mlir/IR/BuiltinOps.h"
25#include "llvm/ADT/StringRef.h"
31 mlir::ModuleOp module;
33 const std::unique_ptr<clang::TargetInfo> target;
34 std::unique_ptr<TargetLoweringInfo> targetLoweringInfo;
35 std::unique_ptr<CIRCXXABI> abi;
39 mlir::ModuleOp &module,
40 std::unique_ptr<clang::TargetInfo> target);
51 return *langOpts.CXXABI;
53 "No C++ ABI kind without a target (missing/unsupported cir.triple)");
54 return target->getCXXABI().getKind();
58 "No C++ ABI without a target (missing/unsupported cir.triple)");
68 return target !=
nullptr;
72 "LowerModule has no target (missing/unsupported cir.triple)");
Defines the clang::LangOptions interface.
const clang::LangOptions & getLangOpts() const
mlir::MLIRContext * getMLIRContext()
CIRCXXABI & getCXXABI() const
LowerModule(clang::LangOptions langOpts, clang::CodeGenOptions codeGenOpts, mlir::ModuleOp &module, std::unique_ptr< clang::TargetInfo > target)
clang::TargetCXXABI::Kind getCXXABIKind() const
const TargetLoweringInfo & getTargetLoweringInfo()
const clang::TargetInfo & getTarget() const
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Kind
The basic C++ ABI kind.
Exposes information about the current target.
Defines the clang::TargetInfo interface.
std::unique_ptr< LowerModule > createLowerModule(mlir::ModuleOp module)
static bool makeTripleAlwaysPresent()