r247655 - ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 18:39:27 PDT 2015


Author: chapuni
Date: Mon Sep 14 20:39:27 2015
New Revision: 247655

URL: http://llvm.org/viewvc/llvm-project?rev=247655&view=rev
Log:
ItaniumCXXABI.cpp: Fix a warning. [-Wunused-variable]

Modified:
    cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp

Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=247655&r1=247654&r2=247655&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Mon Sep 14 20:39:27 2015
@@ -3392,14 +3392,13 @@ static void emitConstructorDestructorAli
     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);




More information about the cfe-commits mailing list