From: Ted Kremenek Date: Wed, 28 Jan 2009 00:44:12 +0000 (+0000) Subject: FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and FileEntries. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3eb9219cf4b4e80c377d37aed72d5d6d840b7bc;p=clang 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 --- 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 #include #include @@ -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 DirEntries; - llvm::StringMap FileEntries; + llvm::StringMap DirEntries; + llvm::StringMap FileEntries; /// NextFileUID - Each FileEntry we create is assigned a unique ID #. /// diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index 3f7c4fd74b..c1a486f91e 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -22,7 +22,6 @@ #include "llvm/Bitcode/Serialize.h" #include "llvm/Bitcode/Deserialize.h" #include "llvm/Support/Streams.h" -#include "llvm/Support/Allocator.h" #include "llvm/Config/config.h" using namespace clang;