diff options
author | Anders Carlsson <andersca@mac.com> | 2009-09-22 17:23:30 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-09-22 17:23:30 +0000 |
commit | 5cc58c6cfe4a6378287dbf92f9b1a23e133a6118 (patch) | |
tree | 02b097db23458e6fb6f6429c8c99fab9fc24281f /lib/CodeGen/Mangle.cpp | |
parent | b2ef1beb812988ce45804d655c9a72bc523d5014 (diff) |
Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 973f0d188c..5a994d2234 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -279,11 +279,8 @@ void CXXNameMangler::mangleName(const NamedDecl *ND) { // ::= <local-name> // const DeclContext *DC = ND->getDeclContext(); - while (isa<LinkageSpecDecl>(DC)) { - assert(cast<LinkageSpecDecl>(DC)->getLanguage() == - LinkageSpecDecl::lang_cxx && "Unexpected linkage decl!"); + while (isa<LinkageSpecDecl>(DC)) DC = DC->getParent(); - } if (DC->isTranslationUnit() || isStdNamespace(DC)) { // Check if we have a template. |