diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-29 19:41:00 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-29 19:41:00 +0000 |
commit | 072ef7420a24fcace83d09603756a3ed08ac12be (patch) | |
tree | 6e484056d93d7927c327ec85f2a725e219ab965d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c6a47895f73b8e4489b4a724942bad439c6dde3f (diff) | |
download | bcm5719-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.cpp | 4 |
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); |