diff options
author | Devang Patel <dpatel@apple.com> | 2007-10-23 02:10:49 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-10-23 02:10:49 +0000 |
commit | b84a06e68ffd71da22e3c75b6e4bbdba37816413 (patch) | |
tree | 1d218863bb30d46284d0c652b491f65d0b2131b3 /CodeGen/CodeGenFunction.cpp | |
parent | 9f0a1cb8cf741d8ccd86beb15b50867b0758750f (diff) |
Begin struct layout work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CodeGen/CodeGenFunction.cpp b/CodeGen/CodeGenFunction.cpp index 1457ec5606..9e3f1cef38 100644 --- a/CodeGen/CodeGenFunction.cpp +++ b/CodeGen/CodeGenFunction.cpp @@ -126,3 +126,14 @@ void CodeGenFunction::StartBlock(const char *N) { BB->setName(N); } +/// getRecordLayoutInfo - Return record layout info. +RecordLayoutInfo *CodeGenFunction::getRecordLayoutInfo(CodeGenTypes &CGT, + QualType RTy) { + assert (isa<RecordType>(RTy) + && "Unexpected type. RecordType expected here."); + + const llvm::Type *Ty = ConvertType(RTy); + assert (Ty && "Unable to find llvm::Type"); + + return CGT.getRecordLayoutInfo(Ty); +} |