History log of /llvm-project/clang/lib/Basic/SourceManager.cpp (Results 376 – 397 of 397)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1e9e86f4 19-Jan-2009 Chris Lattner <sabre@nondot.org>

remove the public SourceManager::getContentCacheForLoc method.

llvm-svn: 62497


# 7e343b21 19-Jan-2009 Chris Lattner <sabre@nondot.org>

SourceManager::getBufferData(SourceLocation) is dead, delete it.

llvm-svn: 62495


# 91fda394 19-Jan-2009 Chris Lattner <sabre@nondot.org>

some minor cleanups to SourceManager, and eliminate the
SourceManager::getBuffer(SourceLocation) method.

llvm-svn: 62494


# 71dc14b9 17-Jan-2009 Chris Lattner <sabre@nondot.org>

Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID

Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't. Fix these along the way.

llvm-svn: 62427

show more ...


# d32480d3 17-Jan-2009 Chris Lattner <sabre@nondot.org>

this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This i

this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.

llvm-svn: 62407

show more ...


# 80097925 17-Jan-2009 Chris Lattner <sabre@nondot.org>

make "ContentCache::Buffer" mutable to avoid a const_cast.

llvm-svn: 62403


# 8a42586c 16-Jan-2009 Chris Lattner <sabre@nondot.org>

more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.

llvm-svn: 62316


# 3c91971b 16-Jan-2009 Chris Lattner <sabre@nondot.org>

rename "virtual location" of a macro to "instantiation location".

llvm-svn: 62315


# 53e384f6 16-Jan-2009 Chris Lattner <sabre@nondot.org>

Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physica

Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!

llvm-svn: 62309

show more ...


# 763ea559 06-Jan-2009 Ted Kremenek <kremenek@apple.com>

SourceManager: Implement "lazy" creation of MemBuffers for source files.

- Big Idea:
Source files are now mmaped when ContentCache::getBuffer() is first called.
While this doesn't change the f

SourceManager: Implement "lazy" creation of MemBuffers for source files.

- Big Idea:
Source files are now mmaped when ContentCache::getBuffer() is first called.
While this doesn't change the functionality when lexing regular source files,
it can result in source files not being paged in when using PTH.

- Performance change:
- No observable difference (-fsyntax-only/-Eonly) on Cocoa.h when doing
regular source lexing.
- No observable time difference (-fsyntax-only/-Eonly) on Cocoa.h when using
PTH. We do observe, however, a reduction of 279K in memory mapped source
code (3% reduction). The majority of pages from Cocoa.h (and friends) are
still being pulled in, however, because any literal will cause
Preprocessor::getSpelling() to be called (causing the source for the file to
get pulled in). The next possible optimization is to cache literal strings
in the PTH file to avoid the need for the original header sources entirely.

- Right now there is a preprocessor directive to toggle between "lazy" and
"eager" creation of MemBuffers. This is not permanent, and is there in the
short term to just test additional optimizations.

llvm-svn: 61827

show more ...


# 12c2af44 06-Jan-2009 Ted Kremenek <kremenek@apple.com>

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()'

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.

llvm-svn: 61782

show more ...


# 746d474b 18-Nov-2008 Chris Lattner <sabre@nondot.org>

SourceManager::getLineNumber is logically const except for caching.
Use mutable to make it so.

llvm-svn: 59498


Revision tags: llvmorg-2.4.0
# 66a740e6 27-Oct-2008 Chris Lattner <sabre@nondot.org>

Rename Characteristic_t to CharacteristicKind

llvm-svn: 58224


# 378c5539 29-Sep-2008 Nico Weber <nicolasweber@gmx.de>

whitespace and comment changes, to fix grammar and 80 col violations

llvm-svn: 56776


# b03dc764 26-Sep-2008 Chris Lattner <sabre@nondot.org>

clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h

llvm-svn: 56692


# c88a23e8 26-Sep-2008 Chris Lattner <sabre@nondot.org>

Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo
to whether the fileid is a 'extern c system header' in addition to whether it
is a system header, most of this is spreadin

Fix the rest of rdar://6243860 hopefully. This requires changing FileIDInfo
to whether the fileid is a 'extern c system header' in addition to whether it
is a system header, most of this is spreading plumbing around. Once we have that,
PPLexerChange bases its "file enter/exit" notifications to PPCallbacks to
base the system header state on FileIDInfo instead of HeaderSearch. Finally,
in Preprocessor::HandleIncludeDirective, mirror logic in GCC: the system headerness
of a file being entered can be set due to the #includer or the #includee.

llvm-svn: 56688

show more ...


# 4c311643 10-Aug-2008 Nico Weber <nicolasweber@gmx.de>

* Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional f

* Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed

llvm-svn: 54620

show more ...


Revision tags: llvmorg-2.3.0
# 595cf9ff 01-Apr-2008 Chris Lattner <sabre@nondot.org>

Update to match simplified llvm MemoryBuffer interfaces for files.

llvm-svn: 49042


# 4f6002c7 01-Apr-2008 Chris Lattner <sabre@nondot.org>

prune dead #includes

llvm-svn: 49033


# 47448288 01-Apr-2008 Chris Lattner <sabre@nondot.org>

MemoryBuffer::getFile got smarter, obviating the need for readfilefast.
The new MemoryBuffer doesn't "leak" file descriptors and handles the
small file case efficiently.

llvm-svn: 49032


# 93eea6e1 31-Mar-2008 Steve Naroff <snaroff@apple.com>

Hack ReadFileFast() to raise the threshold of memory mapped files (from 4->12 pages).

This is a temporary solution to avoid running out of file descriptors (which defaults to 256).

Need to benchmar

Hack ReadFileFast() to raise the threshold of memory mapped files (from 4->12 pages).

This is a temporary solution to avoid running out of file descriptors (which defaults to 256).

Need to benchmark to understand the speed benefit. If the benefit is small, the simple solution is to avoid memory mapping files. If the benefit is significant, more thought is necessary.

llvm-svn: 48991

show more ...


# 7a51313d 15-Mar-2008 Chris Lattner <sabre@nondot.org>

Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. Th

Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402

show more ...


1...<<111213141516