summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-04-08 11:46:08 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2022-04-08 11:52:31 +0800
commit74b56e02bda09ae735c6aeca583a2078375f2da1 (patch)
treec55f582cb7c02f1dae0df48868457a2bb14e3e82 /clang/lib/CodeGen/CodeGenModule.cpp
parentda41214d653808db86bcefeb97da842012ebd104 (diff)
[NFC] Remove unused variable in CodeGenModules
This eliminates an unused-variable warning
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index ec34d91e6537..c9e5354d3269 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -5183,11 +5183,9 @@ void CodeGenModule::EmitAliasDefinition(GlobalDecl GD) {
SetCommonAttributes(GD, GA);
// Emit global alias debug information.
- if (const auto *VD = dyn_cast<VarDecl>(D)) {
- if (CGDebugInfo *DI = getModuleDebugInfo()) {
+ if (isa<VarDecl>(D))
+ if (CGDebugInfo *DI = getModuleDebugInfo())
DI->EmitGlobalAlias(cast<llvm::GlobalValue>(GA->getAliasee()), GD);
- }
- }
}
void CodeGenModule::emitIFuncDefinition(GlobalDecl GD) {