aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-28 16:39:45 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-28 16:39:45 +0000
commit23b0543e3f8322e3ff54439f1f2e82f953e094d0 (patch)
tree53520b0422e90e1b9f371a40ca1328b420cedbe9
parent5a4e11dd3fe7d9d39eeb2b712f18079ee81cb804 (diff)
downloadexternal_llvm-23b0543e3f8322e3ff54439f1f2e82f953e094d0.zip
external_llvm-23b0543e3f8322e3ff54439f1f2e82f953e094d0.tar.gz
external_llvm-23b0543e3f8322e3ff54439f1f2e82f953e094d0.tar.bz2
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
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Target/PIC16/PIC16ISelLowering.cpp b/lib/Target/PIC16/PIC16ISelLowering.cpp
index 605fbe9..87753f9 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<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;