aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--clang/lib/Serialization/GlobalModuleIndex.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 54ab17681ee9..462d29c2a0f1 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/lib/Serialization/GlobalModuleIndex.cpp
@@ -10,12 +10,12 @@
//
//===----------------------------------------------------------------------===//
+#include "clang/Serialization/GlobalModuleIndex.h"
#include "ASTReaderInternals.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Serialization/ASTBitCodes.h"
-#include "clang/Serialization/GlobalModuleIndex.h"
-#include "clang/Serialization/Module.h"
+#include "clang/Serialization/ModuleFile.h"
#include "clang/Serialization/PCHContainerOperations.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/MapVector.h"
@@ -125,16 +125,17 @@ typedef llvm::OnDiskIterableChainedHashTable<IdentifierIndexReaderTrait>
}
-GlobalModuleIndex::GlobalModuleIndex(std::unique_ptr<llvm::MemoryBuffer> Buffer,
- llvm::BitstreamCursor Cursor)
- : Buffer(std::move(Buffer)), IdentifierIndex(), NumIdentifierLookups(),
+GlobalModuleIndex::GlobalModuleIndex(
+ std::unique_ptr<llvm::MemoryBuffer> IndexBuffer,
+ llvm::BitstreamCursor Cursor)
+ : Buffer(std::move(IndexBuffer)), IdentifierIndex(), NumIdentifierLookups(),
NumIdentifierLookupHits() {
- auto Fail = [&Buffer](llvm::Error &&Err) {
+ auto Fail = [&](llvm::Error &&Err) {
report_fatal_error("Module index '" + Buffer->getBufferIdentifier() +
"' failed: " + toString(std::move(Err)));
};
- llvm::TimeTraceScope TimeScope("Module LoadIndex", StringRef(""));
+ llvm::TimeTraceScope TimeScope("Module LoadIndex");
// Read the global index.
bool InGlobalIndexBlock = false;
bool Done = false;
@@ -770,7 +771,7 @@ bool GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
}
using namespace llvm;
- llvm::TimeTraceScope TimeScope("Module WriteIndex", StringRef(""));
+ llvm::TimeTraceScope TimeScope("Module WriteIndex");
// Emit the file header.
Stream.Emit((unsigned)'B', 8);