summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
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) {