[cfe-commits] r120106 - in /cfe/trunk/lib/CodeGen: CGRecordLayout.h CGRecordLayoutBuilder.cpp
Anders Carlsson
andersca at mac.com
Wed Nov 24 11:37:16 PST 2010
Author: andersca
Date: Wed Nov 24 13:37:16 2010
New Revision: 120106
URL: http://llvm.org/viewvc/llvm-project?rev=120106&view=rev
Log:
CGRecordLayout types are always struct types.
Modified:
cfe/trunk/lib/CodeGen/CGRecordLayout.h
cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/CodeGen/CGRecordLayout.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRecordLayout.h?rev=120106&r1=120105&r2=120106&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRecordLayout.h (original)
+++ cfe/trunk/lib/CodeGen/CGRecordLayout.h Wed Nov 24 13:37:16 2010
@@ -14,7 +14,7 @@
#include "clang/AST/Decl.h"
namespace llvm {
class raw_ostream;
- class Type;
+ class StructType;
}
namespace clang {
@@ -173,11 +173,11 @@
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 @@
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;
}
Modified: cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp?rev=120106&r1=120105&r2=120106&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp Wed Nov 24 13:37:16 2010
@@ -733,11 +733,11 @@
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;
More information about the cfe-commits
mailing list