mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Adapt to new interface function materialization interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
17aa9d3f53
commit
5c72a3ae10
@ -256,18 +256,14 @@ void *JIT::getPointerToFunction(Function *F) {
|
|||||||
return Addr; // Check if function already code gen'd
|
return Addr; // Check if function already code gen'd
|
||||||
|
|
||||||
// Make sure we read in the function if it exists in this Module
|
// Make sure we read in the function if it exists in this Module
|
||||||
if (F->hasNotBeenReadFromBytecode())
|
if (F->hasNotBeenReadFromBytecode()) {
|
||||||
try {
|
std::string ErrorMsg;
|
||||||
MP->materializeFunction(F);
|
if (MP->materializeFunction(F, &ErrorMsg)) {
|
||||||
} catch ( std::string& errmsg ) {
|
|
||||||
std::cerr << "Error reading function '" << F->getName()
|
std::cerr << "Error reading function '" << F->getName()
|
||||||
<< "' from bytecode file: " << errmsg << "\n";
|
<< "' from bytecode file: " << ErrorMsg << "\n";
|
||||||
abort();
|
|
||||||
} catch (...) {
|
|
||||||
std::cerr << "Error reading function '" << F->getName()
|
|
||||||
<< "from bytecode file!\n";
|
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (F->isExternal()) {
|
if (F->isExternal()) {
|
||||||
void *Addr = getPointerToNamedFunction(F->getName());
|
void *Addr = getPointerToNamedFunction(F->getName());
|
||||||
|
Loading…
Reference in New Issue
Block a user