summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-11-14 09:32:40 -0800
committerKazu Hirata <kazu@google.com>2021-11-14 09:32:40 -0800
commitd0ac215dd5496a44ce8a6660378ea40a6e1c148d (patch)
tree508a6b1a7df3d0c5065c3f2aba72cc998e8ded10 /clang/lib/CodeGen/CodeGenModule.cpp
parent7379736774475e80a58023b95afa8a7cca5f7007 (diff)
[clang] Use isa instead of dyn_cast (NFC)
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 c28c2e2e85d8..1f094ed72724 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1953,7 +1953,7 @@ void CodeGenModule::setLLVMFunctionFEnvAttributes(const FunctionDecl *D,
void CodeGenModule::SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV) {
const Decl *D = GD.getDecl();
- if (dyn_cast_or_null<NamedDecl>(D))
+ if (isa_and_nonnull<NamedDecl>(D))
setGVProperties(GV, GD);
else
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
@@ -4807,7 +4807,7 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old,
callSite->getOperandBundlesAsDefs(newBundles);
llvm::CallBase *newCall;
- if (dyn_cast<llvm::CallInst>(callSite)) {
+ if (isa<llvm::CallInst>(callSite)) {
newCall =
llvm::CallInst::Create(newFn, newArgs, newBundles, "", callSite);
} else {