diff options
author | Matthias Braun <matze@braunis.de> | 2017-10-12 22:28:54 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-10-12 22:28:54 +0000 |
commit | a063107f8d12831004583ab9c1fd70f84806a563 (patch) | |
tree | 0cd8201b19e2d5322836d4c6d396da3542d99ce1 /tools/llc | |
parent | 8520e4812b6acaa0e24d5e633c0c882e19c6afa9 (diff) |
TargetMachine: Merge TargetMachine and LLVMTargetMachine
Merge LLVMTargetMachine into TargetMachine.
- There is no in-tree target anymore that just implements TargetMachine
but not LLVMTargetMachine.
- It should still be possible to stub out all the various functions in
case a target does not want to use lib/CodeGen
- This simplifies the code and avoids methods ending up in the wrong
interface.
Differential Revision: https://reviews.llvm.org/D38489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315633 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r-- | tools/llc/llc.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index fe6b97e34b6..923095a0056 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -511,8 +511,7 @@ static int compileModule(char **argv, LLVMContext &Context) { } const char *argv0 = argv[0]; - LLVMTargetMachine &LLVMTM = static_cast<LLVMTargetMachine&>(*Target); - MachineModuleInfo *MMI = new MachineModuleInfo(&LLVMTM); + MachineModuleInfo *MMI = new MachineModuleInfo(Target.get()); // Construct a custom pass pipeline that starts after instruction // selection. @@ -521,7 +520,7 @@ static int compileModule(char **argv, LLVMContext &Context) { errs() << argv0 << ": run-pass is for .mir file only.\n"; return 1; } - TargetPassConfig &TPC = *LLVMTM.createPassConfig(PM); + TargetPassConfig &TPC = *Target->createPassConfig(PM); if (TPC.hasLimitedCodeGenPipeline()) { errs() << argv0 << ": run-pass cannot be used with " << TPC.getLimitedCodeGenPipelineReason(" and ") << ".\n"; |