1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

don't crash in some bad cases.

llvm-svn: 20776
This commit is contained in:
Chris Lattner 2005-03-23 01:29:26 +00:00
parent 6d9578f11d
commit 8fa2449908

View File

@ -330,6 +330,9 @@ static Value *getVal(const Type *Ty, const ValID &ID) {
Value *V = getValNonImprovising(Ty, ID);
if (V) return V;
if (!Ty->isFirstClassType() && !isa<OpaqueType>(Ty))
ThrowException("Invalid use of a composite type!");
// If we reached here, we referenced either a symbol that we don't know about
// or an id number that hasn't been read yet. We may be referencing something
// forward, so just create an entry to be resolved later and get to it...