aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CodeGen/CodeGenFunction.cpp')
-rw-r--r--CodeGen/CodeGenFunction.cpp11
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);
+}