diff options
author | Anders Carlsson <andersca@mac.com> | 2010-11-24 19:37:16 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-11-24 19:37:16 +0000 |
commit | ba2c2eec87d614b06e194b289627bbfe0642e4ce (patch) | |
tree | 62bff1fd0dd2d6d67fbaa63ad6146bba48261a89 /lib/CodeGen | |
parent | 32303020d0f1a21cbcab65ae0c69a4218dc8f0fb (diff) |
CGRecordLayout types are always struct types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGRecordLayout.h | 14 | ||||
-rw-r--r-- | lib/CodeGen/CGRecordLayoutBuilder.cpp | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/lib/CodeGen/CGRecordLayout.h b/lib/CodeGen/CGRecordLayout.h index ffdbc292d3..b7efe5a4ee 100644 --- a/lib/CodeGen/CGRecordLayout.h +++ b/lib/CodeGen/CGRecordLayout.h @@ -14,7 +14,7 @@ #include "clang/AST/Decl.h" namespace llvm { class raw_ostream; - class Type; + class StructType; } namespace clang { @@ -173,11 +173,11 @@ class CGRecordLayout { private: /// The LLVM type corresponding to this record layout. - const llvm::Type *LLVMType; + const llvm::StructType *LLVMType; /// The LLVM type for the non-virtual part of this record layout, used for /// laying out the record as a base. - const llvm::Type *NonVirtualBaseLLVMType; + const llvm::StructType *NonVirtualBaseLLVMType; /// Map from (non-bit-field) struct field to the corresponding llvm struct /// type field no. This info is populated by record builder. @@ -196,18 +196,18 @@ private: bool IsZeroInitializable : 1; public: - CGRecordLayout(const llvm::Type *LLVMType, - const llvm::Type *NonVirtualBaseLLVMType, + CGRecordLayout(const llvm::StructType *LLVMType, + const llvm::StructType *NonVirtualBaseLLVMType, bool IsZeroInitializable) : LLVMType(LLVMType), NonVirtualBaseLLVMType(NonVirtualBaseLLVMType), IsZeroInitializable(IsZeroInitializable) {} /// \brief Return the LLVM type associated with this record. - const llvm::Type *getLLVMType() const { + const llvm::StructType *getLLVMType() const { return LLVMType; } - const llvm::Type *getNonVirtualBaseLLVMType() const { + const llvm::StructType *getNonVirtualBaseLLVMType() const { return NonVirtualBaseLLVMType; } diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp index 9e45df886e..ce42a6aaaa 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -733,11 +733,11 @@ CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D) { Builder.Layout(D); - const llvm::Type *Ty = llvm::StructType::get(getLLVMContext(), - Builder.FieldTypes, - Builder.Packed); + const llvm::StructType *Ty = llvm::StructType::get(getLLVMContext(), + Builder.FieldTypes, + Builder.Packed); - const llvm::Type *BaseTy = 0; + const llvm::StructType *BaseTy = 0; if (isa<CXXRecordDecl>(D)) { if (Builder.NonVirtualBaseTypeIsSameAsCompleteType) BaseTy = Ty; |