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 6a8a0f4..7d6a9f7 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -714,7 +714,10 @@
/// 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" <<