diff options
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
| -rw-r--r-- | llvm/tools/opt/opt.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 95defb6a1a0..5995a7de2e4 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -401,12 +401,12 @@ int main(int argc, char **argv) { PassManager Passes; // Add an appropriate TargetLibraryInfo pass for the module's triple. - TargetLibraryInfo *TLI = new TargetLibraryInfo(Triple(M->getTargetTriple())); + TargetLibraryInfo TLI(Triple(M->getTargetTriple())); // The -disable-simplify-libcalls flag actually disables all builtin optzns. if (DisableSimplifyLibCalls) - TLI->disableAllFunctions(); - Passes.add(TLI); + TLI.disableAllFunctions(); + Passes.add(new TargetLibraryInfoWrapperPass(TLI)); // Add an appropriate DataLayout instance for this module. const DataLayout *DL = M->getDataLayout(); |

