From 3e11ccea96910f478f770297614424e3e52a2177 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 23 Oct 2007 02:10:49 +0000 Subject: Begin struct layout work. llvm-svn: 43236 --- clang/CodeGen/CodeGenFunction.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'clang/CodeGen/CodeGenFunction.cpp') 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(RTy) + && "Unexpected type. RecordType expected here."); + + const llvm::Type *Ty = ConvertType(RTy); + assert (Ty && "Unable to find llvm::Type"); + + return CGT.getRecordLayoutInfo(Ty); +} -- cgit v1.2.3