Fixes a code gen. bug by removing an assert.

It is ok to have c++-ness inside extern "C" 
block. Fixes pr6644.

llvm-svn: 101948
This commit is contained in:
Fariborz Jahanian
2010-04-20 22:02:31 +00:00
parent 0151b7edb7
commit acdfa7acfe
2 changed files with 13 additions and 2 deletions

View File

@@ -306,8 +306,6 @@ static bool isStd(const NamespaceDecl *NS) {
static const DeclContext *IgnoreLinkageSpecDecls(const DeclContext *DC) {
while (isa<LinkageSpecDecl>(DC)) {
assert(cast<LinkageSpecDecl>(DC)->getLanguage() ==
LinkageSpecDecl::lang_cxx && "Unexpected linkage decl!");
DC = DC->getParent();
}

View File

@@ -0,0 +1,13 @@
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// pr6644
extern "C" {
namespace N {
struct X {
virtual void f();
};
void X::f() { }
}
}
// CHECK: define void @_ZN1N1X1fEv