mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-21 01:25:20 +00:00
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:
parent
b3b6f5338c
commit
23192ebe95
@ -431,7 +431,7 @@ static bool ResolveType(PATypeHolder<Type> &T) {
|
|||||||
ValID &DID = getValIDFromPlaceHolder(Ty);
|
ValID &DID = getValIDFromPlaceHolder(Ty);
|
||||||
|
|
||||||
const Type *TheRealType = getTypeVal(DID, true);
|
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.
|
// Refine the opaque type we had to the new type we are getting.
|
||||||
cast<DerivedType>(Ty)->refineAbstractTypeTo(TheRealType);
|
cast<DerivedType>(Ty)->refineAbstractTypeTo(TheRealType);
|
||||||
@ -450,7 +450,7 @@ static void ResolveTypes(vector<PATypeHolder<Type> > &LateResolveTypes) {
|
|||||||
ValID &DID = getValIDFromPlaceHolder(Ty);
|
ValID &DID = getValIDFromPlaceHolder(Ty);
|
||||||
|
|
||||||
if (DID.Type == ValID::NameVal)
|
if (DID.Type == ValID::NameVal)
|
||||||
ThrowException("Reference to an invalid type: '" +DID.getName(),
|
ThrowException("Reference to an invalid type: '" +DID.getName() + "'",
|
||||||
getLineNumFromPlaceHolder(Ty));
|
getLineNumFromPlaceHolder(Ty));
|
||||||
else
|
else
|
||||||
ThrowException("Reference to an invalid type: #" + itostr(DID.Num),
|
ThrowException("Reference to an invalid type: #" + itostr(DID.Num),
|
||||||
|
Loading…
Reference in New Issue
Block a user