mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-26 10:29:36 +00:00
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();
|
||
|
}
|
||
|
}
|