mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
GlobalValue is always pointer type, so an assert isn't required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a4e11dd3f
commit
23b0543e3f
@ -483,13 +483,8 @@ bool PIC16TargetLowering::isRomAddress(const SDValue &Op) {
|
||||
// It is BUILD_PAIR((PIC16Lo TGA), (PIC16Hi TGA)) and Op is BUILD_PAIR
|
||||
SDValue TGA = Op.getOperand(0).getOperand(0);
|
||||
GlobalAddressSDNode *GSDN = dyn_cast<GlobalAddressSDNode>(TGA);
|
||||
const Type *ValueType = GSDN->getGlobal()->getType();
|
||||
int AddrSpace = GSDN->getGlobal()->getType()->getAddressSpace();
|
||||
|
||||
if (!isa<PointerType>(ValueType)) {
|
||||
assert(0 && "TGA must be of a PointerType");
|
||||
}
|
||||
|
||||
int AddrSpace = dyn_cast<PointerType>(ValueType)->getAddressSpace();
|
||||
if (AddrSpace == PIC16ISD::ROM_SPACE)
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user