diff options
Diffstat (limited to 'clang/lib/CodeGen/CGRecordLayout.h')
-rw-r--r-- | clang/lib/CodeGen/CGRecordLayout.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGRecordLayout.h b/clang/lib/CodeGen/CGRecordLayout.h index e95591e5cc0..965fcc5201e 100644 --- a/clang/lib/CodeGen/CGRecordLayout.h +++ b/clang/lib/CodeGen/CGRecordLayout.h @@ -174,20 +174,21 @@ private: /// Whether one of the fields in this record layout is a pointer to data /// member, or a struct that contains pointer to data member. - bool ContainsPointerToDataMember : 1; + bool IsZeroInitializable : 1; public: - CGRecordLayout(const llvm::Type *T, bool ContainsPointerToDataMember) - : LLVMType(T), ContainsPointerToDataMember(ContainsPointerToDataMember) {} + CGRecordLayout(const llvm::Type *T, bool IsZeroInitializable) + : LLVMType(T), IsZeroInitializable(IsZeroInitializable) {} /// \brief Return the LLVM type associated with this record. const llvm::Type *getLLVMType() const { return LLVMType; } - /// \brief Check whether this struct contains pointers to data members. - bool containsPointerToDataMember() const { - return ContainsPointerToDataMember; + /// \brief Check whether this struct can be C++ zero-initialized + /// with a zeroinitializer. + bool isZeroInitializable() const { + return IsZeroInitializable; } /// \brief Return llvm::StructType element number that corresponds to the |