aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/FileManager.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-28 00:44:12 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-28 00:44:12 +0000
commitf3eb9219cf4b4e80c377d37aed72d5d6d840b7bc (patch)
tree9f671c5be1c7654a8c0c974797616b50ca070972 /include/clang/Basic/FileManager.h
parent010d5143800f6dc986f90169a694ccfec3d52038 (diff)
FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and FileEntries.
Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m): non-PTH: 0.4% improvement PTH: 0.8% improvement git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/FileManager.h')
-rw-r--r--include/clang/Basic/FileManager.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h
index 1b4ca81c39..aff9758f81 100644
--- a/include/clang/Basic/FileManager.h
+++ b/include/clang/Basic/FileManager.h
@@ -16,6 +16,7 @@
#include "llvm/ADT/StringMap.h"
#include "llvm/Bitcode/SerializationFwd.h"
+#include "llvm/Support/Allocator.h"
#include <map>
#include <set>
#include <string>
@@ -86,8 +87,8 @@ class FileManager {
/// DirEntries/FileEntries - This is a cache of directory/file entries we have
/// looked up. The actual Entry is owned by UniqueFiles/UniqueDirs above.
///
- llvm::StringMap<DirectoryEntry*> DirEntries;
- llvm::StringMap<FileEntry*> FileEntries;
+ llvm::StringMap<DirectoryEntry*, llvm::BumpPtrAllocator> DirEntries;
+ llvm::StringMap<FileEntry*, llvm::BumpPtrAllocator> FileEntries;
/// NextFileUID - Each FileEntry we create is assigned a unique ID #.
///