Implement support for C++11 in-class initialization of non-static data members.

llvm-svn: 132878
This commit is contained in:
Richard Smith
2011-06-11 17:19:42 +00:00
parent 1c2d29e3c3
commit 938f40b5aa
57 changed files with 1564 additions and 283 deletions

View File

@@ -304,7 +304,11 @@ static void computeBlockInfo(CodeGenModule &CGM, CGBlockInfo &info) {
const DeclContext *DC = block->getDeclContext();
for (; isa<BlockDecl>(DC); DC = cast<BlockDecl>(DC)->getDeclContext())
;
QualType thisType = cast<CXXMethodDecl>(DC)->getThisType(C);
QualType thisType;
if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(DC))
thisType = C.getPointerType(C.getRecordType(RD));
else
thisType = cast<CXXMethodDecl>(DC)->getThisType(C);
const llvm::Type *llvmType = CGM.getTypes().ConvertType(thisType);
std::pair<CharUnits,CharUnits> tinfo