diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-08-23 01:25:01 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-08-23 01:25:01 +0000 |
| commit | fc3eaa47fa2ef70ab21131005c328adda3020737 (patch) | |
| tree | 777338d19e91e829f91ac7bcad654dab0647c2a1 /lib/CodeGen/CodeGenTypes.h | |
| parent | 341bdf8d565f5282779a0ffd2d2b77f3a38b735e (diff) | |
| download | clang-fc3eaa47fa2ef70ab21131005c328adda3020737.tar.gz clang-fc3eaa47fa2ef70ab21131005c328adda3020737.tar.bz2 clang-fc3eaa47fa2ef70ab21131005c328adda3020737.tar.xz | |
More work towards zero-initializing structs that contain member pointers in constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
| -rw-r--r-- | lib/CodeGen/CodeGenTypes.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h index 530946bb8f..22ebbf1682 100644 --- a/lib/CodeGen/CodeGenTypes.h +++ b/lib/CodeGen/CodeGenTypes.h @@ -53,17 +53,27 @@ namespace CodeGen { /// lowering AST types to LLVM types. class CGRecordLayout { CGRecordLayout(); // DO NOT IMPLEMENT + + /// LLVMType - The LLVMType corresponding to this record layout. + const llvm::Type *LLVMType; + + /// ContainsMemberPointer - Whether one of the fields in this record layout + /// is a member pointer, or a struct that contains a member pointer. + bool ContainsMemberPointer; + public: - CGRecordLayout(const llvm::Type *T) - : STy(T) { } + CGRecordLayout(const llvm::Type *T, bool ContainsMemberPointer) + : LLVMType(T), ContainsMemberPointer(ContainsMemberPointer) { } /// getLLVMType - Return llvm type associated with this record. const llvm::Type *getLLVMType() const { - return STy; + return LLVMType; } - private: - const llvm::Type *STy; + bool containsMemberPointer() const { + return ContainsMemberPointer; + } + }; /// CodeGenTypes - This class organizes the cross-module state that is used |
