From: Chris Lattner Date: Sun, 21 Oct 2001 21:43:25 +0000 (+0000) Subject: Fix bug caused by: X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=23192ebe953bb50c09dca6de2b30681a044b2411;p=oota-llvm.git Fix bug caused by: %list = type opaque %list = type %list git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@931 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 128d4797758..28562ac0b1e 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -431,7 +431,7 @@ static bool ResolveType(PATypeHolder &T) { ValID &DID = getValIDFromPlaceHolder(Ty); const Type *TheRealType = getTypeVal(DID, true); - if (TheRealType == 0) return true; + if (TheRealType == 0 || TheRealType == Ty) return true; // Refine the opaque type we had to the new type we are getting. cast(Ty)->refineAbstractTypeTo(TheRealType); @@ -450,7 +450,7 @@ static void ResolveTypes(vector > &LateResolveTypes) { ValID &DID = getValIDFromPlaceHolder(Ty); if (DID.Type == ValID::NameVal) - ThrowException("Reference to an invalid type: '" +DID.getName(), + ThrowException("Reference to an invalid type: '" +DID.getName() + "'", getLineNumFromPlaceHolder(Ty)); else ThrowException("Reference to an invalid type: #" + itostr(DID.Num),