mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	[opaque pointer type] Use GlobalVariable::getValueType rather than accessing it through the GV's pointee type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -1385,7 +1385,7 @@ static ICmpInst::Predicate areGlobalsPotentiallyEqual(const GlobalValue *GV1,
 | 
			
		||||
    if (GV->hasExternalWeakLinkage() || GV->hasWeakAnyLinkage())
 | 
			
		||||
      return true;
 | 
			
		||||
    if (const auto *GVar = dyn_cast<GlobalVariable>(GV)) {
 | 
			
		||||
      Type *Ty = GVar->getType()->getPointerElementType();
 | 
			
		||||
      Type *Ty = GVar->getValueType();
 | 
			
		||||
      // A global with opaque type might end up being zero sized.
 | 
			
		||||
      if (!Ty->isSized())
 | 
			
		||||
        return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user