aboutsummaryrefslogtreecommitdiff
path: root/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
commite81c5619f11e1ececf99ff30d15e5abfb6ea0c28 (patch)
tree7449f2058b7a8d9fe9f23c9a2d970992bb995949 /lib/CodeGen/Mangle.cpp
parent1c3d5029dbfb5bb01ab38d53e7d4dc29e9a8591f (diff)
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
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r--lib/CodeGen/Mangle.cpp2
1 files changed, 1 insertions, 1 deletions
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<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)