summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-08-28 04:28:19 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-08-28 04:28:19 +0000
commit39c81e281629886bfa491434e31516b2056d0985 (patch)
treeb0b1ff5b7d83d851e804aad3c20379024760bb7b /clang/lib/CodeGen/CGDebugInfo.cpp
parentc5cafbb074d216d6fa6bc5beb05f236e736490d2 (diff)
downloadbcm5719-llvm-39c81e281629886bfa491434e31516b2056d0985.tar.gz
bcm5719-llvm-39c81e281629886bfa491434e31516b2056d0985.zip
[C++11] Support for capturing of variable length arrays in lambda expression.
Differential Revision: http://reviews.llvm.org/D4368 llvm-svn: 216649
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 0b20f541b68..d55b646c7f5 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -852,12 +852,11 @@ CollectRecordLambdaFields(const CXXRecordDecl *CXXDecl,
C.getLocation(), Field->getAccess(),
layout.getFieldOffset(fieldno), VUnit, RecordTy);
elements.push_back(fieldType);
- } else {
+ } else if (C.capturesThis()) {
// TODO: Need to handle 'this' in some way by probably renaming the
// this of the lambda class and having a field member of 'this' or
// by using AT_object_pointer for the function and having that be
// used as 'this' for semantic references.
- 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();
OpenPOWER on IntegriCloud