eliminate ReadASTBitcodeFile


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67903 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/clang.cpp b/tools/clang-cc/clang.cpp
index 7f46f46..9bd6dfb 100644
--- a/tools/clang-cc/clang.cpp
+++ b/tools/clang-cc/clang.cpp
@@ -1535,7 +1535,14 @@
     exit (1);
   }
   
-  llvm::OwningPtr<TranslationUnit> TU(ReadASTBitcodeFile(Filename, FileMgr));
+  llvm::OwningPtr<TranslationUnit> TU;
+  
+  // Create the memory buffer that contains the contents of the file.  
+  llvm::OwningPtr<llvm::MemoryBuffer> 
+    MBuffer(llvm::MemoryBuffer::getFile(Filename.c_str()));
+  
+  if (MBuffer)
+    TU.reset(ReadASTBitcodeBuffer(*MBuffer, FileMgr));
   
   if (!TU) {
     fprintf(stderr, "error: file '%s' could not be deserialized\n",