Improve unique_ptr-y ownership in ASTUnit::ComputePreamble

Rather than having a pair of pairs and a reference out parameter, build
a structure with everything together and named. A raw pointer and a
unique_ptr, rather than a raw pointer and a boolean, are used to
communicate ownership transfer.

It's possible one day we'll end up with a conditional pointer (probably
represented by a raw pointer and a boolean) abstraction to use in places
like this. Conditional ownership seems to be coming up more often than
I'd hoped...

llvm-svn: 216712
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 0e25127..99cd4a2 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -683,9 +683,8 @@
   }
 
   CompilerInstance &CI = getCompilerInstance();
-  std::unique_ptr<llvm::MemoryBuffer> Buffer
-      = CI.getFileManager().getBufferForFile(getCurrentFile());
-  if (Buffer) {
+  if (std::unique_ptr<llvm::MemoryBuffer> Buffer =
+          CI.getFileManager().getBufferForFile(getCurrentFile())) {
     unsigned Preamble =
         Lexer::ComputePreamble(Buffer->getBuffer(), CI.getLangOpts()).first;
     llvm::outs().write(Buffer->getBufferStart(), Preamble);