[llvm] r209639 - Use existing helper function.

Rafael Espindola rafael.espindola at gmail.com
Mon May 26 12:57:55 PDT 2014


Author: rafael
Date: Mon May 26 14:57:55 2014
New Revision: 209639

URL: http://llvm.org/viewvc/llvm-project?rev=209639&view=rev
Log:
Use existing helper function.

No functionality change.

Modified:
    llvm/trunk/lib/IR/Verifier.cpp

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=209639&r1=209638&r2=209639&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon May 26 14:57:55 2014
@@ -497,14 +497,7 @@ void Verifier::visitGlobalAlias(const Gl
                 "addrspacecast of GlobalValue",
             &GA);
 
-    if (CE->getOpcode() == Instruction::BitCast) {
-      unsigned SrcAS = GV->getType()->getPointerAddressSpace();
-      unsigned DstAS = CE->getType()->getPointerAddressSpace();
-
-      Assert1(SrcAS == DstAS,
-              "Alias bitcasts cannot be between different address spaces",
-              &GA);
-    }
+    VerifyConstantExprBitcastType(CE);
   }
   Assert1(!GV->isDeclaration(), "Alias must point to a definition", &GA);
   if (const GlobalAlias *GAAliasee = dyn_cast<GlobalAlias>(GV)) {





More information about the llvm-commits mailing list