mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Allow TargetMachine to refuse static code gen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4415 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -281,10 +281,14 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
Target.addPassesToEmitAssembly(Passes, *Out);
|
||||
|
||||
// Run our queue of passes all at once now, efficiently.
|
||||
Passes.run(*M.get());
|
||||
// Ask the target to add backend passes as neccesary
|
||||
if (Target.addPassesToEmitAssembly(Passes, *Out)) {
|
||||
cerr << argv[0] << ": target '" << Target.TargetName
|
||||
<< " does not support static compilation!\n";
|
||||
} else {
|
||||
// Run our queue of passes all at once now, efficiently.
|
||||
Passes.run(*M.get());
|
||||
}
|
||||
|
||||
// Delete the ostream if it's not a stdout stream
|
||||
if (Out != &std::cout) delete Out;
|
||||
|
Reference in New Issue
Block a user