From 23b0543e3f8322e3ff54439f1f2e82f953e094d0 Mon Sep 17 00:00:00 2001 From: Sanjiv Gupta Date: Tue, 28 Apr 2009 16:39:45 +0000 Subject: [PATCH] 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 --- lib/Target/PIC16/PIC16ISelLowering.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/Target/PIC16/PIC16ISelLowering.cpp b/lib/Target/PIC16/PIC16ISelLowering.cpp index 605fbe94155..87753f98c55 100644 --- a/lib/Target/PIC16/PIC16ISelLowering.cpp +++ b/lib/Target/PIC16/PIC16ISelLowering.cpp @@ -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(TGA); - const Type *ValueType = GSDN->getGlobal()->getType(); + int AddrSpace = GSDN->getGlobal()->getType()->getAddressSpace(); - if (!isa(ValueType)) { - assert(0 && "TGA must be of a PointerType"); - } - - int AddrSpace = dyn_cast(ValueType)->getAddressSpace(); if (AddrSpace == PIC16ISD::ROM_SPACE) return true; -- 2.34.1