clang API Documentation
#include <CGRecordLayout.h>
Public Member Functions | |
| CGRecordLayout (llvm::StructType *CompleteObjectType, llvm::StructType *BaseSubobjectType, bool IsZeroInitializable, bool IsZeroInitializableAsBase) | |
| llvm::StructType * | getLLVMType () const |
| Return the "complete object" LLVM type associated with this record. | |
| llvm::StructType * | getBaseSubobjectLLVMType () const |
| Return the "base subobject" LLVM type associated with this record. | |
| bool | isZeroInitializable () const |
| Check whether this struct can be C++ zero-initialized with a zeroinitializer. | |
| bool | isZeroInitializableAsBase () const |
| Check whether this struct can be C++ zero-initialized with a zeroinitializer when considered as a base subobject. | |
| unsigned | getLLVMFieldNo (const FieldDecl *FD) const |
| Return llvm::StructType element number that corresponds to the field FD. | |
| unsigned | getNonVirtualBaseLLVMFieldNo (const CXXRecordDecl *RD) const |
| unsigned | getVirtualBaseIndex (const CXXRecordDecl *base) const |
| Return the LLVM field index corresponding to the given virtual base. Only valid when operating on the complete object. | |
| const CGBitFieldInfo & | getBitFieldInfo (const FieldDecl *FD) const |
| Return the BitFieldInfo that corresponds to the field FD. | |
| void | print (raw_ostream &OS) const |
| void | dump () const |
Friends | |
| class | CodeGenTypes |
CGRecordLayout - This class handles struct and union layout info while lowering AST types to LLVM types.
These layout objects are only created on demand as IR generation requires.
Definition at line 171 of file CGRecordLayout.h.
| clang::CodeGen::CGRecordLayout::CGRecordLayout | ( | llvm::StructType * | CompleteObjectType, |
| llvm::StructType * | BaseSubobjectType, | ||
| bool | IsZeroInitializable, | ||
| bool | IsZeroInitializableAsBase | ||
| ) | [inline] |
Definition at line 212 of file CGRecordLayout.h.
| void CGRecordLayout::dump | ( | ) | const |
Definition at line 1139 of file CGRecordLayoutBuilder.cpp.
References print().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout().
| llvm::StructType* clang::CodeGen::CGRecordLayout::getBaseSubobjectLLVMType | ( | ) | const [inline] |
Return the "base subobject" LLVM type associated with this record.
Definition at line 229 of file CGRecordLayout.h.
Referenced by EmitNullConstant().
| const CGBitFieldInfo& clang::CodeGen::CGRecordLayout::getBitFieldInfo | ( | const FieldDecl * | FD | ) | const [inline] |
Return the BitFieldInfo that corresponds to the field FD.
Definition at line 266 of file CGRecordLayout.h.
References clang::FieldDecl::isBitField().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), and clang::CodeGen::CodeGenFunction::EmitLValueForBitfield().
| unsigned clang::CodeGen::CGRecordLayout::getLLVMFieldNo | ( | const FieldDecl * | FD | ) | const [inline] |
Return llvm::StructType element number that corresponds to the field FD.
Definition at line 247 of file CGRecordLayout.h.
References clang::FieldDecl::isBitField().
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), and EmitNullConstant().
| llvm::StructType* clang::CodeGen::CGRecordLayout::getLLVMType | ( | ) | const [inline] |
Return the "complete object" LLVM type associated with this record.
Definition at line 223 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), and EmitNullConstant().
| unsigned clang::CodeGen::CGRecordLayout::getNonVirtualBaseLLVMFieldNo | ( | const CXXRecordDecl * | RD | ) | const [inline] |
Definition at line 253 of file CGRecordLayout.h.
Referenced by EmitNullConstant().
| unsigned clang::CodeGen::CGRecordLayout::getVirtualBaseIndex | ( | const CXXRecordDecl * | base | ) | const [inline] |
Return the LLVM field index corresponding to the given virtual base. Only valid when operating on the complete object.
Definition at line 260 of file CGRecordLayout.h.
Referenced by EmitNullConstant().
| bool clang::CodeGen::CGRecordLayout::isZeroInitializable | ( | ) | const [inline] |
Check whether this struct can be C++ zero-initialized with a zeroinitializer.
Definition at line 235 of file CGRecordLayout.h.
Referenced by clang::CodeGen::CodeGenTypes::isZeroInitializable().
| bool clang::CodeGen::CGRecordLayout::isZeroInitializableAsBase | ( | ) | const [inline] |
Check whether this struct can be C++ zero-initialized with a zeroinitializer when considered as a base subobject.
Definition at line 241 of file CGRecordLayout.h.
Referenced by EmitNullConstantForBase().
| void ProgramState::print | ( | raw_ostream & | OS | ) | const |
Definition at line 1109 of file CGRecordLayoutBuilder.cpp.
References clang::RecordDecl::field_begin(), clang::DeclContext::getParent(), and Index.
Referenced by dump().
friend class CodeGenTypes [friend] |
Definition at line 172 of file CGRecordLayout.h.