summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-09-01 21:49:51 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-09-01 21:49:51 +0000
commit0112b11f5c4dcc14a08153e97ddaa5c9a5908c50 (patch)
treeb2f2bc2e05579e68c85d8f0b2b21705d564cba05 /clang/lib/CodeGen
parenta04ad1a1b9030ade5dd908e0684a862c5ccc93d0 (diff)
downloadbcm5719-llvm-0112b11f5c4dcc14a08153e97ddaa5c9a5908c50.tar.gz
bcm5719-llvm-0112b11f5c4dcc14a08153e97ddaa5c9a5908c50.zip
Don't try to emit unsupported templated friend declarations. They're unsupported
and may very well be dependent-types, triggering an assertion in debug info codegen. llvm-svn: 138970
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 44c16a32b36..01aa6e906a4 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -774,7 +774,7 @@ CGDebugInfo::CreateCXXMemberFunction(const CXXMethodDecl *Method,
Flags |= llvm::DIDescriptor::FlagPrototyped;
llvm::DISubprogram SP =
- DBuilder.createMethod(RecordTy , MethodName, MethodLinkageName,
+ DBuilder.createMethod(RecordTy, MethodName, MethodLinkageName,
MethodDefUnit, MethodLine,
MethodTy, /*isLocalToUnit=*/false,
/* isDefinition=*/ false,
@@ -811,9 +811,10 @@ void CGDebugInfo::
CollectCXXFriends(const CXXRecordDecl *RD, llvm::DIFile Unit,
SmallVectorImpl<llvm::Value *> &EltTys,
llvm::DIType RecordTy) {
-
for (CXXRecordDecl::friend_iterator BI = RD->friend_begin(),
BE = RD->friend_end(); BI != BE; ++BI) {
+ if ((*BI)->isUnsupportedFriend())
+ continue;
if (TypeSourceInfo *TInfo = (*BI)->getFriendType())
EltTys.push_back(DBuilder.createFriend(RecordTy,
getOrCreateType(TInfo->getType(),
OpenPOWER on IntegriCloud