[cfe-commits] r107309 - /cfe/trunk/lib/CodeGen/Mangle.cpp

Fariborz Jahanian fjahanian at apple.com
Wed Jun 30 11:57:21 PDT 2010


Author: fjahanian
Date: Wed Jun 30 13:57:21 2010
New Revision: 107309

URL: http://llvm.org/viewvc/llvm-project?rev=107309&view=rev
Log:
Use isFunctionOrMethod for vars declared locallly
in method/blocks to decide not to mangle them.


Modified:
    cfe/trunk/lib/CodeGen/Mangle.cpp

Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=107309&r1=107308&r2=107309&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Wed Jun 30 13:57:21 2010
@@ -294,7 +294,7 @@
   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)





More information about the cfe-commits mailing list