Upreferences are always OpaqueTypes, meaning that it is impossible for a non-abstract
authorChris Lattner <sabre@nondot.org>
Mon, 9 Feb 2004 03:03:10 +0000 (03:03 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 9 Feb 2004 03:03:10 +0000 (03:03 +0000)
type from containing one.  This speeds up the asmparser on the testcase in PR224 from
61->50s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11220 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 523f95cd44a7abdce52aa7c2829464f06298ea7f..f0f027ec248a851c2b752864b5e8bc3b07987f54 100644 (file)
@@ -603,6 +603,7 @@ static std::vector<std::pair<unsigned, OpaqueType *> > UpRefs;
 /// thus we can complete the cycle.
 ///
 static PATypeHolder HandleUpRefs(const Type *ty) {
+  if (!ty->isAbstract()) return ty;
   PATypeHolder Ty(ty);
   UR_OUT("Type '" << Ty->getDescription() << 
          "' newly formed.  Resolving upreferences.\n" <<