mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
MIR Parser: Report an error when a machine function doesn't have a corresponding function.
This commit reports an error when a machine function from a MIR file that contains LLVM IR can't find a function with the same name in the loaded LLVM IR module. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10468 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239831 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -173,6 +173,9 @@ bool MIRParserImpl::parseMachineFunction(yaml::Input &In, Module &M,
|
||||
Functions.insert(std::make_pair(FunctionName, std::move(MF)));
|
||||
if (NoLLVMIR)
|
||||
createDummyFunction(FunctionName, M);
|
||||
else if (!M.getFunction(FunctionName))
|
||||
return error(Twine("function '") + FunctionName +
|
||||
"' isn't defined in the provided LLVM IR");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user