llvm.org GIT mirror llvm / 3248223
Remove unnecessary calls to unique_ptr::get. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224105 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
339339 // Load the input module...
340340 std::unique_ptr M = parseIRFile(InputFilename, Err, Context);
341341
342 if (!M.get()) {
342 if (!M) {
343343 Err.print(argv[0], errs());
344344 return 1;
345345 }
388388 // The user has asked to use the new pass manager and provided a pipeline
389389 // string. Hand off the rest of the functionality to the new code for that
390390 // layer.
391 return runPassPipeline(argv[0], Context, *M.get(), Out.get(), PassPipeline,
391 return runPassPipeline(argv[0], Context, *M, Out.get(), PassPipeline,
392392 OK, VK)
393393 ? 0
394394 : 1;
408408 Passes.add(TLI);
409409
410410 // Add an appropriate DataLayout instance for this module.
411 const DataLayout *DL = M.get()->getDataLayout();
411 const DataLayout *DL = M->getDataLayout();
412412 if (!DL && !DefaultDataLayout.empty()) {
413413 M->setDataLayout(DefaultDataLayout);
414 DL = M.get()->getDataLayout();
414 DL = M->getDataLayout();
415415 }
416416
417417 if (DL)
424424 std::unique_ptr TM(Machine);
425425
426426 // Add internal analysis passes from the target machine.
427 if (TM.get())
427 if (TM)
428428 TM->addAnalysisPasses(Passes);
429429
430430 std::unique_ptr FPasses;
432432 FPasses.reset(new FunctionPassManager(M.get()));
433433 if (DL)
434434 FPasses->add(new DataLayoutPass());
435 if (TM.get())
435 if (TM)
436436 TM->addAnalysisPasses(*FPasses);
437437
438438 }
577577 cl::PrintOptionValues();
578578
579579 // Now that we have all of the passes ready, run them.
580 Passes.run(*M.get());
580 Passes.run(*M);
581581
582582 // Declare success.
583583 if (!NoOutput || PrintBreakpoints)