Sfoglia il codice sorgente

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

Fariborz Jahanian 15 anni fa
parent
commit
e81c5619f1
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      lib/CodeGen/Mangle.cpp

+ 1 - 1
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<FunctionDecl>(DC) || isa<ObjCMethodDecl>(DC) ) && D->hasLinkage())
+    if (DC->isFunctionOrMethod() && D->hasLinkage())
       while (!DC->isNamespace() && !DC->isTranslationUnit())
         DC = DC->getParent();
     if (DC->isTranslationUnit() && D->getLinkage() != InternalLinkage)