clang: lib/CIR/CodeGen/TargetInfo.cpp Source File (original) (raw)

6

7using namespace clang;

9

13 if (!rd)

14 return false;

15

16

17 if (const CXXRecordDecl *cxxrd = dyn_cast(rd)) {

18 if (cxxrd->isDynamicClass())

19 return false;

20

21 for (const auto &i : cxxrd->bases())

23 return false;

24 }

25

26 for (const auto *i : rd->fields())

28 return false;

29

30 return true;

31}

32

36 return true;

37

39 return false;

40

42}

43

44namespace {

45

46class X8664ABIInfo : public ABIInfo {

47public:

49};

50

52public:

53 X8664TargetCIRGenInfo(CIRGenTypes &cgt)

54 : TargetCIRGenInfo(std::make_unique(cgt)) {}

55};

56

57}

58

59std::unique_ptr

61 return std::make_unique(cgt);

62}

63

65

68

69

70

71

72 return false;

73}

74

76 CIRGenFunction &cgf, mlir::Value v, cir::TargetAddressSpaceAttr srcAddr,

77 mlir::Type destTy, bool isNonNull) const {

78

79

80 if (cir::GlobalOp globalOp = v.getDefiningOpcir::GlobalOp())

81 cgf.cgm.errorNYI("Global op addrspace cast");

82

84}

mlir::Value createAddrSpaceCast(mlir::Location loc, mlir::Value src, mlir::Type newTy)

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

CIRGenBuilderTy & getBuilder()

DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)

Helpers to emit "not yet implemented" error diagnostics.

This class organizes the cross-module state that is used while lowering AST types to CIR types.

virtual mlir::Value performAddrSpaceCast(CIRGenFunction &cgf, mlir::Value v, cir::TargetAddressSpaceAttr srcAddr, mlir::Type destTy, bool isNonNull=false) const

Perform address space cast of an expression of pointer type.

Definition TargetInfo.cpp:75

TargetCIRGenInfo(std::unique_ptr< ABIInfo > info)

virtual bool isNoProtoCallVariadic(const FunctionNoProtoType *fnType) const

Determine whether a call to an unprototyped functions under the given calling convention should use t...

Definition TargetInfo.cpp:66

Represents a C++ struct/union/class.

Represents a member of a struct/union/class.

bool isUnnamedBitField() const

Determines whether this is an unnamed bitfield.

bool isZeroLengthBitField() const

Is this a zero-length bit-field?

Represents a K&R-style 'int foo()' function, which has no information available about its arguments.

A (possibly-)qualified type.

RecordDecl * getAsRecordDecl() const

Retrieves the RecordDecl this type refers to.

std::unique_ptr< TargetCIRGenInfo > createX8664TargetCIRGenInfo(CIRGenTypes &cgt)

Definition TargetInfo.cpp:60

bool isEmptyFieldForLayout(const ASTContext &context, const FieldDecl *fd)

isEmptyFieldForLayout - Return true if the field is "empty", that is, either a zero-width bit-field o...

Definition TargetInfo.cpp:33

bool isEmptyRecordForLayout(const ASTContext &context, QualType t)

isEmptyRecordForLayout - Return true if a structure contains only empty base classes (per isEmptyReco...

Definition TargetInfo.cpp:10

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