mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Also a couple of other changes to avoid use of PointerType::getElementType here & there too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236799 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			14 lines
		
	
	
		
			354 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			354 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "llvm/IR/Operator.h"
 | 
						|
#include "llvm/IR/Instructions.h"
 | 
						|
#include "llvm/IR/Type.h"
 | 
						|
 | 
						|
#include "ConstantsContext.h"
 | 
						|
 | 
						|
namespace llvm {
 | 
						|
Type *GEPOperator::getSourceElementType() const {
 | 
						|
  if (auto *I = dyn_cast<GetElementPtrInst>(this))
 | 
						|
    return I->getSourceElementType();
 | 
						|
  return cast<GetElementPtrConstantExpr>(this)->getSourceElementType();
 | 
						|
}
 | 
						|
}
 |