mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
13
clang/test/CodeGenCXX/c-linkage.cpp
Normal file
13
clang/test/CodeGenCXX/c-linkage.cpp
Normal 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
|
||||
Reference in New Issue
Block a user