aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-21 21:43:25 +0000
committerChris Lattner <sabre@nondot.org>2001-10-21 21:43:25 +0000
commit23192ebe953bb50c09dca6de2b30681a044b2411 (patch)
treefd33052c69038b2290b8b06bb283fadd13df7863 /lib
parentb3b6f5338c246ad1b209047cf9422fbf08fb1ddc (diff)
downloadexternal_llvm-23192ebe953bb50c09dca6de2b30681a044b2411.zip
external_llvm-23192ebe953bb50c09dca6de2b30681a044b2411.tar.gz
external_llvm-23192ebe953bb50c09dca6de2b30681a044b2411.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/AsmParser/llvmAsmParser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 128d479..28562ac 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -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),