From: Devang Patel Date: Sat, 23 Feb 2008 01:17:17 +0000 (+0000) Subject: Use isa check instead of getTypeID() check. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=155b8746bab35856a08f0df2c6439ec658d8aaaa;p=oota-llvm.git Use isa check instead of getTypeID() check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47518 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index b36e85c4a6c..084a328844e 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1462,7 +1462,7 @@ ResultTypes : Types { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription()); - if (!(*$1)->isFirstClassType() && (*$1)->getTypeID() != Type::StructTyID) + if (!(*$1)->isFirstClassType() && !isa($1->get())) GEN_ERROR("LLVM functions cannot return aggregate types"); $$ = $1; }