mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
Revert r109361; it's impossible to write a call with an argument with an
invalid type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109365 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b30cdd830b
commit
83b4a97060
@ -3710,12 +3710,8 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS,
|
||||
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
|
||||
// Pull out the types of all of the arguments...
|
||||
std::vector<const Type*> ParamTypes;
|
||||
for (unsigned i = 0, e = ArgList.size(); i != e; ++i) {
|
||||
const Type* ArgTy = ArgList[i].V->getType();
|
||||
if (!FunctionType::isValidArgumentType(ArgTy))
|
||||
return Error(ArgList[i].Loc, "Invalid argument type for LLVM function");
|
||||
ParamTypes.push_back(ArgTy);
|
||||
}
|
||||
for (unsigned i = 0, e = ArgList.size(); i != e; ++i)
|
||||
ParamTypes.push_back(ArgList[i].V->getType());
|
||||
|
||||
if (!FunctionType::isValidReturnType(RetType))
|
||||
return Error(RetTypeLoc, "Invalid result type for LLVM function");
|
||||
|
Loading…
Reference in New Issue
Block a user