diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-27 20:57:45 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-27 20:57:45 +0000 |
commit | cad86653942d4e33c2674ea40e77d7fe59990130 (patch) | |
tree | 3219329c642de4e5379dec12c3af4af806d4409f /lib/CodeGen/TargetABIInfo.cpp | |
parent | 3c38aab8bbcb8dbc80081616e74f64b9a47edd25 (diff) |
Some minor changes toward support of data
member access in the presense of non-virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetABIInfo.cpp')
-rw-r--r-- | lib/CodeGen/TargetABIInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetABIInfo.cpp b/lib/CodeGen/TargetABIInfo.cpp index 5c8d5dd230..76d75715bd 100644 --- a/lib/CodeGen/TargetABIInfo.cpp +++ b/lib/CodeGen/TargetABIInfo.cpp @@ -723,6 +723,10 @@ void X86_64ABIInfo::classify(QualType Ty, // Reset Lo class, this will be recomputed. Current = NoClass; unsigned idx = 0; + // FIXME. This will probably change when virtual bases are supported. + if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) + idx += CXXRD->getNumBases(); + for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); i != e; ++i, ++idx) { uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx); |