diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 929f70215b9..729588d627c 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -246,7 +246,8 @@ int main(int argc, char **argv) { PM.run(mod); } else { // Build up all of the passes that we want to do to the module. - FunctionPassManager Passes(new ExistingModuleProvider(M.get())); + ExistingModuleProvider Provider(M.release()); + FunctionPassManager Passes(&Provider); Passes.add(new TargetData(*Target.getTargetData())); #ifndef NDEBUG