diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-07-23 03:17:50 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-07-23 03:17:50 +0000 |
| commit | 45372a6fdcd2b0840704569478db456822e02bae (patch) | |
| tree | 9b19eda1cf1e031252487ae8a8033dae6ea97106 /lib/CodeGen/CodeGenTypes.h | |
| parent | f1c8380d26cc392ad8f26e788af176a6e0bf8fd1 (diff) | |
| download | clang-45372a6fdcd2b0840704569478db456822e02bae.tar.gz clang-45372a6fdcd2b0840704569478db456822e02bae.tar.bz2 clang-45372a6fdcd2b0840704569478db456822e02bae.tar.xz | |
Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
| -rw-r--r-- | lib/CodeGen/CodeGenTypes.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h index b72d8e9201..925b933fca 100644 --- a/lib/CodeGen/CodeGenTypes.h +++ b/lib/CodeGen/CodeGenTypes.h @@ -52,14 +52,15 @@ namespace CodeGen { class CGRecordLayout { CGRecordLayout(); // DO NOT IMPLEMENT public: - CGRecordLayout(llvm::Type *T, llvm::SmallSet<unsigned, 8> &PF) + CGRecordLayout(const llvm::Type *T, + const llvm::SmallSet<unsigned, 8> &PF) : STy(T), PaddingFields(PF) { // FIXME : Collect info about fields that requires adjustments // (i.e. fields that do not directly map to llvm struct fields.) } /// getLLVMType - Return llvm type associated with this record. - llvm::Type *getLLVMType() const { + const llvm::Type *getLLVMType() const { return STy; } @@ -72,7 +73,7 @@ namespace CodeGen { } private: - llvm::Type *STy; + const llvm::Type *STy; llvm::SmallSet<unsigned, 8> PaddingFields; }; |
