mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
don't crash in some bad cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1e9d1475bc
commit
60cd9558ba
@ -330,6 +330,9 @@ static Value *getVal(const Type *Ty, const ValID &ID) {
|
|||||||
Value *V = getValNonImprovising(Ty, ID);
|
Value *V = getValNonImprovising(Ty, ID);
|
||||||
if (V) return V;
|
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
|
// 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
|
// 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...
|
// forward, so just create an entry to be resolved later and get to it...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user