mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Keep only the splitCodegen version that takes a factory.
This makes it much easier to see that all created TargetMachines are equivalent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266564 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -36,25 +36,6 @@ codegen(Module *M, llvm::raw_pwrite_stream &OS,
|
||||
CodeGenPasses.run(*M);
|
||||
}
|
||||
|
||||
std::unique_ptr<Module>
|
||||
llvm::splitCodeGen(std::unique_ptr<Module> M, ArrayRef<raw_pwrite_stream *> OSs,
|
||||
ArrayRef<llvm::raw_pwrite_stream *> BCOSs, StringRef CPU,
|
||||
StringRef Features, const TargetOptions &Options,
|
||||
Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL,
|
||||
TargetMachine::CodeGenFileType FileType,
|
||||
bool PreserveLocals) {
|
||||
std::string TripleStr = M->getTargetTriple();
|
||||
std::string ErrMsg;
|
||||
|
||||
const Target *TheTarget = TargetRegistry::lookupTarget(TripleStr, ErrMsg);
|
||||
if (!TheTarget)
|
||||
report_fatal_error(Twine("Target not found: ") + ErrMsg);
|
||||
return splitCodeGen(std::move(M), OSs, BCOSs, [&]() {
|
||||
return std::unique_ptr<TargetMachine>(TheTarget->createTargetMachine(
|
||||
TripleStr, CPU, Features, Options, RM, CM, OL));
|
||||
}, FileType, PreserveLocals);
|
||||
}
|
||||
|
||||
std::unique_ptr<Module> llvm::splitCodeGen(
|
||||
std::unique_ptr<Module> M, ArrayRef<llvm::raw_pwrite_stream *> OSs,
|
||||
ArrayRef<llvm::raw_pwrite_stream *> BCOSs,
|
||||
|
||||
Reference in New Issue
Block a user