aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-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)