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
This commit is contained in:
Chris Lattner 2001-10-21 21:43:25 +00:00
parent b3b6f5338c
commit 23192ebe95

View File

@ -431,7 +431,7 @@ static bool ResolveType(PATypeHolder<Type> &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<DerivedType>(Ty)->refineAbstractTypeTo(TheRealType);
@ -450,7 +450,7 @@ static void ResolveTypes(vector<PATypeHolder<Type> > &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),