mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 08:47:42 +00:00
reapply 'reject forward references to functions whose type don't match'
now that the testsuite has been updated. llvm-svn: 101866
This commit is contained in:
parent
5f8489396e
commit
7a2ce4afd8
@ -2787,6 +2787,10 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
|
|||||||
ForwardRefVals.find(FunctionName);
|
ForwardRefVals.find(FunctionName);
|
||||||
if (FRVI != ForwardRefVals.end()) {
|
if (FRVI != ForwardRefVals.end()) {
|
||||||
Fn = M->getFunction(FunctionName);
|
Fn = M->getFunction(FunctionName);
|
||||||
|
if (Fn->getType() != PFT)
|
||||||
|
return Error(FRVI->second.second, "invalid forward reference to "
|
||||||
|
"function '" + FunctionName + "' with wrong type!");
|
||||||
|
|
||||||
ForwardRefVals.erase(FRVI);
|
ForwardRefVals.erase(FRVI);
|
||||||
} else if ((Fn = M->getFunction(FunctionName))) {
|
} else if ((Fn = M->getFunction(FunctionName))) {
|
||||||
// If this function already exists in the symbol table, then it is
|
// If this function already exists in the symbol table, then it is
|
||||||
|
@ -20,4 +20,4 @@ declare void @llvm.memset.i32(i8*, i8, i32, i32)
|
|||||||
|
|
||||||
declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
|
declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
|
||||||
|
|
||||||
declare void @llvm.memmove.i64(i8*, i8*, i32, i32)
|
declare void @llvm.memmove.i64(i8*, i8*, i64, i32)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user