mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
Fix build failures from 4f6477a615
.
This commit is contained in:
parent
c16f3260a9
commit
34004d2d03
@ -516,6 +516,10 @@ namespace llvm {
|
||||
bool parseExceptionArgs(SmallVectorImpl<Value *> &Args,
|
||||
PerFunctionState &PFS);
|
||||
|
||||
bool resolveFunctionType(Type *RetType,
|
||||
const SmallVector<ParamInfo, 16> &ArgList,
|
||||
FunctionType *&FuncTy);
|
||||
|
||||
// Constant Parsing.
|
||||
bool parseValID(ValID &ID, PerFunctionState *PFS,
|
||||
Type *ExpectedTy = nullptr);
|
||||
|
@ -6417,7 +6417,9 @@ bool LLParser::parseIndirectBr(Instruction *&Inst, PerFunctionState &PFS) {
|
||||
// If RetType is a non-function pointer type, then this is the short syntax
|
||||
// for the call, which means that RetType is just the return type. Infer the
|
||||
// rest of the function argument types from the arguments that are present.
|
||||
static bool resolveFunctionType(Type *RetType, const SmallVector<ParamInfo, 16> &ArgList, FunctionType *&FuncTy) {
|
||||
bool LLParser::resolveFunctionType(Type *RetType,
|
||||
const SmallVector<ParamInfo, 16> &ArgList,
|
||||
FunctionType *&FuncTy) {
|
||||
FuncTy = dyn_cast<FunctionType>(RetType);
|
||||
if (!FuncTy) {
|
||||
// Pull out the types of all of the arguments...
|
||||
@ -6426,7 +6428,7 @@ static bool resolveFunctionType(Type *RetType, const SmallVector<ParamInfo, 16>
|
||||
ParamTypes.push_back(ArgList[i].V->getType());
|
||||
|
||||
if (!FunctionType::isValidReturnType(RetType))
|
||||
return error(RetTypeLoc, "Invalid result type for LLVM function");
|
||||
return true;
|
||||
|
||||
FuncTy = FunctionType::get(RetType, ParamTypes, false);
|
||||
}
|
||||
@ -6468,7 +6470,7 @@ bool LLParser::parseInvoke(Instruction *&Inst, PerFunctionState &PFS) {
|
||||
// rest of the function argument types from the arguments that are present.
|
||||
FunctionType *Ty;
|
||||
if (resolveFunctionType(RetType, ArgList, Ty))
|
||||
return true;
|
||||
return error(RetTypeLoc, "Invalid result type for LLVM function");
|
||||
|
||||
CalleeID.FTy = Ty;
|
||||
|
||||
@ -6785,7 +6787,7 @@ bool LLParser::parseCallBr(Instruction *&Inst, PerFunctionState &PFS) {
|
||||
// rest of the function argument types from the arguments that are present.
|
||||
FunctionType *Ty;
|
||||
if (resolveFunctionType(RetType, ArgList, Ty))
|
||||
return true;
|
||||
return error(RetTypeLoc, "Invalid result type for LLVM function");
|
||||
|
||||
CalleeID.FTy = Ty;
|
||||
|
||||
@ -7181,7 +7183,7 @@ bool LLParser::parseCall(Instruction *&Inst, PerFunctionState &PFS,
|
||||
// rest of the function argument types from the arguments that are present.
|
||||
FunctionType *Ty;
|
||||
if (resolveFunctionType(RetType, ArgList, Ty))
|
||||
return true;
|
||||
return error(RetTypeLoc, "Invalid result type for LLVM function");
|
||||
|
||||
CalleeID.FTy = Ty;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user