summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-09-19 21:47:34 +0000
committerEric Christopher <echristo@apple.com>2012-09-19 21:47:34 +0000
commit7106ec3ecb5214177d282ae8ce33142f725a9d92 (patch)
treedc291cfcf64cc89587a0e0b6a72b2d3b0c0bac4b /clang/lib/CodeGen/CGDebugInfo.cpp
parent0f143ae8af79943e466cbac7620f37f6e205e710 (diff)
downloadbcm5719-llvm-7106ec3ecb5214177d282ae8ce33142f725a9d92.tar.gz
bcm5719-llvm-7106ec3ecb5214177d282ae8ce33142f725a9d92.zip
Handle a captured this for the debug information as well.
llvm-svn: 164253
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 027c447131c..d3391b79af4 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -809,6 +809,16 @@ CollectRecordFields(const RecordDecl *record, llvm::DIFile tunit,
Field->getAccess(), layout.getFieldOffset(fieldno),
VUnit, RecordTy);
elements.push_back(fieldType);
+ } else {
+ assert(C.capturesThis() && "Field that isn't captured and isn't this?");
+ FieldDecl *f = *Field;
+ llvm::DIFile VUnit = getOrCreateFile(f->getLocation());
+ QualType type = f->getType();
+ llvm::DIType fieldType
+ = createFieldType("this", type, 0, f->getLocation(), f->getAccess(),
+ layout.getFieldOffset(fieldNo), VUnit, RecordTy);
+
+ elements.push_back(fieldType);
}
}
} else {
OpenPOWER on IntegriCloud