summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-01-29 19:41:00 +0000
committerAnders Carlsson <andersca@mac.com>2011-01-29 19:41:00 +0000
commit072ef7420a24fcace83d09603756a3ed08ac12be (patch)
tree6e484056d93d7927c327ec85f2a725e219ab965d /clang/lib/CodeGen/CodeGenModule.cpp
parentc6a47895f73b8e4489b4a724942bad439c6dde3f (diff)
downloadbcm5719-llvm-072ef7420a24fcace83d09603756a3ed08ac12be.tar.gz
bcm5719-llvm-072ef7420a24fcace83d09603756a3ed08ac12be.zip
Replace an isa/cast with a dyn_cast.
llvm-svn: 124542
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 49c0b35df9a..66ac9fac5c9 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -457,8 +457,8 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
void CodeGenModule::SetCommonAttributes(const Decl *D,
llvm::GlobalValue *GV) {
- if (isa<NamedDecl>(D))
- setGlobalVisibility(GV, cast<NamedDecl>(D));
+ if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
+ setGlobalVisibility(GV, ND);
else
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
OpenPOWER on IntegriCloud