diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-30 18:57:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-30 18:57:21 +0000 |
commit | 02995320e9cba5d2179700f14ce35bbffe12c24e (patch) | |
tree | ef9c02292fc3c53cb141f9f553e8851b26a21114 /clang/lib/CodeGen/Mangle.cpp | |
parent | d0eacf715ff7f83578cd7b5f91d243a74bd57c2e (diff) | |
download | bcm5719-llvm-02995320e9cba5d2179700f14ce35bbffe12c24e.tar.gz bcm5719-llvm-02995320e9cba5d2179700f14ce35bbffe12c24e.zip |
Use isFunctionOrMethod for vars declared locallly
in method/blocks to decide not to mangle them.
llvm-svn: 107309
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 4d755ce9575..2ae1919a65f 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/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) |