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 | 3e11ccea96910f478f770297614424e3e52a2177 (patch) | |
tree | 7c0276a6b66f7ea803d6d8b73f4d8c05792a10fd /clang/CodeGen/CodeGenFunction.cpp | |
parent | d752eae48885821a1f89595e95ef3e5c4622412e (diff) | |
download | bcm5719-llvm-3e11ccea96910f478f770297614424e3e52a2177.tar.gz bcm5719-llvm-3e11ccea96910f478f770297614424e3e52a2177.zip |
Begin struct layout work.
llvm-svn: 43236
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenFunction.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/CodeGen/CodeGenFunction.cpp b/clang/CodeGen/CodeGenFunction.cpp index 1457ec56060..9e3f1cef383 100644 --- a/clang/CodeGen/CodeGenFunction.cpp +++ b/clang/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); +} |