Update to use correct type cast
authorChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:08:08 +0000 (20:08 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 10 Sep 2001 20:08:08 +0000 (20:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@536 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 0568b336ae552662a26857bcfc41fa1bd3306aa3..a6ee7be569fd09b85a59ca44d5b38602a728900c 100644 (file)
@@ -874,7 +874,7 @@ ConstPool : ConstPool OptAssign ConstVal {
   | ConstPool GLOBAL OptAssign Types { // Global declarations appear in CP
     if (!$4->get()->isPointerType() || 
        (((PointerType*)$4->get())->isArrayType() && 
-        ((PointerType*)$4->get())->isArrayType()->isUnsized())) {
+        ((PointerType*)$4->get())->castArrayType()->isUnsized())) {
       ThrowException("Type '" + $4->get()->getDescription() +
                     "' is not a pointer to a sized type!");
     }
@@ -1209,7 +1209,7 @@ InstVal : BinaryOps Types ValueRef ',' ValueRef {
   | CALL TypesV ValueRef '(' ValueRefListE ')' {
     const MethodType *Ty;
 
-    if (!(Ty = (*$2)->isMethodType())) {
+    if (!(Ty = (*$2)->dyncastMethodType())) {
       // Pull out the types of all of the arguments...
       vector<const Type*> ParamTypes;
       for (list<Value*>::iterator I = $5->begin(), E = $5->end(); I != E; ++I)