mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-15 07:59:33 +00:00
Add check to make sure that we dont reference MEthodType's directly
llvm-svn: 704
This commit is contained in:
parent
a01eda3091
commit
a6c7a3f199
@ -295,6 +295,9 @@ static Value *getVal(const Type *Ty, const ValID &D,
|
||||
vector<ValueList> *LateResolver = (CurMeth.CurrentMethod) ?
|
||||
&CurMeth.LateResolveValues : &CurModule.LateResolveValues;
|
||||
|
||||
if (isa<MethodType>(Ty))
|
||||
ThrowException("Methods are not values and must be referenced as pointers");
|
||||
|
||||
if (const PointerType *PTy = dyn_cast<PointerType>(Ty))
|
||||
if (const MethodType *MTy = dyn_cast<MethodType>(PTy->getValueType()))
|
||||
Ty = MTy; // Convert pointer to method to method type
|
||||
|
Loading…
x
Reference in New Issue
Block a user