mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
66583e4917
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();
|
|
}
|
|
}
|