From e81c5619f11e1ececf99ff30d15e5abfb6ea0c28 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 30 Jun 2010 18:57:21 +0000 Subject: Use isFunctionOrMethod for vars declared locallly in method/blocks to decide not to mangle them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107309 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/Mangle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/Mangle.cpp') diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 4d755ce957..2ae1919a65 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -294,7 +294,7 @@ bool MangleContext::shouldMangleDeclName(const NamedDecl *D) { if (!FD) { const DeclContext *DC = D->getDeclContext(); // Check for extern variable declared locally. - if ((isa(DC) || isa(DC) ) && D->hasLinkage()) + if (DC->isFunctionOrMethod() && D->hasLinkage()) while (!DC->isNamespace() && !DC->isTranslationUnit()) DC = DC->getParent(); if (DC->isTranslationUnit() && D->getLinkage() != InternalLinkage) -- cgit v1.2.3-18-g5258