summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-09-22 17:23:30 +0000
committerAnders Carlsson <andersca@mac.com>2009-09-22 17:23:30 +0000
commitfc51cc968b11e805e7c9c2e01136547579e00a6e (patch)
tree652660a2c870a1f93792b1e86ea27e9a9e0d45c8 /clang/lib
parente983d1757020b4f069310015faf11debe9bfe3c9 (diff)
downloadbcm5719-llvm-fc51cc968b11e805e7c9c2e01136547579e00a6e.tar.gz
bcm5719-llvm-fc51cc968b11e805e7c9c2e01136547579e00a6e.zip
Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.
llvm-svn: 82557
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/Mangle.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp
index 973f0d188cb..5a994d2234b 100644
--- a/clang/lib/CodeGen/Mangle.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud