From: Chris Lattner Date: Fri, 18 Aug 2006 17:34:24 +0000 (+0000) Subject: trivial optimization X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=703e92fa1b17b64c464abf9c63286a973a226274;p=oota-llvm.git trivial optimization git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29770 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 6a8a0f40d88..7d6a9f7af36 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -714,7 +714,10 @@ static std::vector UpRefs; /// thus we can complete the cycle. /// static PATypeHolder HandleUpRefs(const Type *ty) { - if (!ty->isAbstract()) return ty; + // If Ty isn't abstract, or if there are no up-references in it, then there is + // nothing to resolve here. + if (!ty->isAbstract() || UpRefs.empty()) return ty; + PATypeHolder Ty(ty); UR_OUT("Type '" << Ty->getDescription() << "' newly formed. Resolving upreferences.\n" <<