diff options
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
| -rw-r--r-- | llvm/tools/opt/opt.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index a736107965c..73f89c0e155 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -593,9 +593,10 @@ int main(int argc, char **argv) { } if (TM) { - Pass *TPC = TM->createPassConfig(Passes); - if (TPC) - Passes.add(TPC); + // FIXME: We should dyn_cast this when supported. + auto <M = static_cast<LLVMTargetMachine &>(*TM); + Pass *TPC = LTM.createPassConfig(Passes); + Passes.add(TPC); } // Create a new optimization pass for each one specified on the command line |

