diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-10-26 22:44:13 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-10-26 22:44:13 +0000 |
commit | a885796d5fd85e4c7c71407feb48553ef7d4e258 (patch) | |
tree | 91527c022eee45fa040d87d150e55b16c515c549 /clang/lib/Serialization/GlobalModuleIndex.cpp | |
parent | 789d29df34169e21d40bd8581c303e1b3a29f6d2 (diff) | |
download | bcm5719-llvm-a885796d5fd85e4c7c71407feb48553ef7d4e258.tar.gz bcm5719-llvm-a885796d5fd85e4c7c71407feb48553ef7d4e258.zip |
Make VFS and FileManager match the current MemoryBuffer API.
This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.
llvm-svn: 220657
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r-- | clang/lib/Serialization/GlobalModuleIndex.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp index 121478ce052..a67f9f36dbb 100644 --- a/clang/lib/Serialization/GlobalModuleIndex.cpp +++ b/clang/lib/Serialization/GlobalModuleIndex.cpp @@ -494,9 +494,7 @@ namespace { bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { // Open the module file. - std::string ErrorStr; - std::unique_ptr<llvm::MemoryBuffer> Buffer = - FileMgr.getBufferForFile(File, &ErrorStr, /*isVolatile=*/true); + auto Buffer = FileMgr.getBufferForFile(File, /*isVolatile=*/true); if (!Buffer) { return true; } @@ -504,8 +502,8 @@ bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) { // Initialize the input stream llvm::BitstreamReader InStreamFile; llvm::BitstreamCursor InStream; - InStreamFile.init((const unsigned char *)Buffer->getBufferStart(), - (const unsigned char *)Buffer->getBufferEnd()); + InStreamFile.init((const unsigned char *)(*Buffer)->getBufferStart(), + (const unsigned char *)(*Buffer)->getBufferEnd()); InStream.init(InStreamFile); // Sniff for the signature. |