]> granicus.if.org Git - clang/commit
Misc changes to SourceManager::ContentCache:
authorTed Kremenek <kremenek@apple.com>
Tue, 6 Jan 2009 01:55:26 +0000 (01:55 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 6 Jan 2009 01:55:26 +0000 (01:55 +0000)
commitc16c208e8519476d838ad11fffc8e0ecea50550d
treecb1a831ffc1654d7f9136338925b6ba4033721b2
parent1e5f3ebb2982f8d7e414d5fc4808000b941563cc
Misc changes to SourceManager::ContentCache:
- 'Buffer' is now private and must be accessed via 'getBuffer()'.
   This paves the way for lazily mapping in source files on demand.
- Added 'getSize()' (which gets the size of the content without
   necessarily accessing the MemBuffer) and 'getSizeBytesMapped()'.
- Modifed SourceManager to use these new methods.  This reduces the
  number of places that actually access the MemBuffer object for a file
  to those that actually look at the character data.

These changes result in no performance change for -fsyntax-only on Cocoa.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61782 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp