summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/Mangle.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-06-30 18:57:21 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-06-30 18:57:21 +0000
commit02995320e9cba5d2179700f14ce35bbffe12c24e (patch)
treeef9c02292fc3c53cb141f9f553e8851b26a21114 /clang/lib/CodeGen/Mangle.cpp
parentd0eacf715ff7f83578cd7b5f91d243a74bd57c2e (diff)
downloadbcm5719-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.cpp2
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)
OpenPOWER on IntegriCloud