mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Return an error_code from materializeAllPermanently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199275 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+3
-3
@@ -413,11 +413,10 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
}
|
||||
|
||||
// If not jitting lazily, load the whole bitcode file eagerly too.
|
||||
std::string ErrorMsg;
|
||||
if (NoLazyCompilation) {
|
||||
if (Mod->MaterializeAllPermanently(&ErrorMsg)) {
|
||||
if (error_code EC = Mod->materializeAllPermanently()) {
|
||||
errs() << argv[0] << ": bitcode didn't read correctly.\n";
|
||||
errs() << "Reason: " << ErrorMsg << "\n";
|
||||
errs() << "Reason: " << EC.message() << "\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -433,6 +432,7 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
DebugIRPass->runOnModule(*Mod);
|
||||
}
|
||||
|
||||
std::string ErrorMsg;
|
||||
EngineBuilder builder(Mod);
|
||||
builder.setMArch(MArch);
|
||||
builder.setMCPU(MCPU);
|
||||
|
||||
Reference in New Issue
Block a user