]> granicus.if.org Git - clang/commitdiff
ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 15 Sep 2015 01:39:27 +0000 (01:39 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 15 Sep 2015 01:39:27 +0000 (01:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247655 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ItaniumCXXABI.cpp

index 31be2f98653049a22db437288d140df901713b8a..85c7fd16030fe32b1f6016e34beaec6bc01ed843 100644 (file)
@@ -3392,14 +3392,13 @@ static void emitConstructorDestructorAlias(CodeGenModule &CGM,
     return;
 
   auto *Aliasee = cast<llvm::GlobalValue>(CGM.GetAddrOfGlobal(TargetDecl));
-  llvm::PointerType *AliasType = Aliasee->getType();
 
   // Create the alias with no name.
   auto *Alias = llvm::GlobalAlias::create(Linkage, "", Aliasee);
 
   // Switch any previous uses to the alias.
   if (Entry) {
-    assert(Entry->getType() == AliasType &&
+    assert(Entry->getType() == Aliasee->getType() &&
            "declaration exists with different type");
     Alias->takeName(Entry);
     Entry->replaceAllUsesWith(Alias);