History log of /llvm-project/clang/lib/Basic/SourceManager.cpp (Results 351 – 375 of 397)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9dc9c206 15-Feb-2009 Chris Lattner <sabre@nondot.org>

track "just a little more" location information for macro instantiations.
Now instead of just tracking the expansion history, also track the full
range of the macro that got replaced. For object-lik

track "just a little more" location information for macro instantiations.
Now instead of just tracking the expansion history, also track the full
range of the macro that got replaced. For object-like macros, this doesn't
change anything. For _Pragma and function-like macros, this means we track
the locations of the ')'.

This is required for PR3579 because apparently GCC uses the line of the ')'
of a function-like macro as the location to expand __LINE__ to.

llvm-svn: 64601

show more ...


# d3c80de9 14-Feb-2009 Cedric Venet <cedric.venet@laposte.net>

Fix the build on win32.

llvm-svn: 64556


# 1c967784 04-Feb-2009 Chris Lattner <sabre@nondot.org>

Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.

For something like this:

# 42 "bar.c" 1
# 142 "bar2.c" 1

#warning zap

Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.

For something like this:

# 42 "bar.c" 1
# 142 "bar2.c" 1

#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta


we now produce these three warnings:

#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
^

#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
^

#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
^

llvm-svn: 63722

show more ...


# 95d9c5e7 04-Feb-2009 Chris Lattner <sabre@nondot.org>

make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.

llvm-svn: 63720


# 0a1a8d85 04-Feb-2009 Chris Lattner <sabre@nondot.org>

propagate linemarker flags down into the the line table, currently
ignoring include stack push/pop info though.

llvm-svn: 63719


# 334a2ada 04-Feb-2009 Chris Lattner <sabre@nondot.org>

replace gimpy linear search with svelte binary search ;-)

llvm-svn: 63717


# 8411e168 04-Feb-2009 Chris Lattner <sabre@nondot.org>

make my atrocious linear search at least search in the order that is
more likely to hit.

llvm-svn: 63714


# 20c50ba2 04-Feb-2009 Chris Lattner <sabre@nondot.org>

add comment

llvm-svn: 63712


# c1219ff7 04-Feb-2009 Chris Lattner <sabre@nondot.org>

add the difference in the line marker phys line number and the
query point to the returned presumed location. We now produce:

foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:93:2: war

add the difference in the line marker phys line number and the
query point to the returned presumed location. We now produce:

foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:93:2: warning: #warning blarg!
#warning blarg!
^
foo.h:94:2: warning: #warning blarg!
#warning blarg!
^

for:

#line 92 "foo.h"
#warning blarg!
#warning blarg!
#warning blarg!

blarg indeed!

llvm-svn: 63710

show more ...


# d4293922 04-Feb-2009 Chris Lattner <sabre@nondot.org>

add really really trivial #line support, where #line now makes every
location below it report as coming from the #line location. For example,
with:

#line 92 "foo.h"
#warning blarg!
#warning blarg!

add really really trivial #line support, where #line now makes every
location below it report as coming from the #line location. For example,
with:

#line 92 "foo.h"
#warning blarg!
#warning blarg!

we now emit:

foo.h:92:2: warning: #warning blarg!
#warning blarg!
^
foo.h:92:2: warning: #warning blarg!
#warning blarg!
^

llvm-svn: 63709

show more ...


# 88ea93e6 04-Feb-2009 Chris Lattner <sabre@nondot.org>

lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.

llvm-svn: 63701


# e4ad4176 04-Feb-2009 Chris Lattner <sabre@nondot.org>

make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization bas

make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.

llvm-svn: 63698

show more ...


# 153a0f1f 04-Feb-2009 Chris Lattner <sabre@nondot.org>

build per-fid linetable entries.

llvm-svn: 63694


# 6e0e1f49 03-Feb-2009 Chris Lattner <sabre@nondot.org>

more plumbing for #line propagation. Use happy bit #3
out of FileInfo :)

llvm-svn: 63672


# 1eaa70a6 03-Feb-2009 Chris Lattner <sabre@nondot.org>

stub out basic #line handling calls.

llvm-svn: 63667


# 9be4f6d6 03-Feb-2009 Chris Lattner <sabre@nondot.org>

reclaim my precious bit in FileInfo by ensuring that ContentCache objects
are 8-byte aligned.

llvm-svn: 63630


# c8233df6 03-Feb-2009 Chris Lattner <sabre@nondot.org>

switch SourceManager from using an std::map and std::list of
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer. This does not speed
up o

switch SourceManager from using an std::map and std::list of
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer. This does not speed
up or slow down things substantially, but gives us control over
their alignment.

llvm-svn: 63628

show more ...


# f1ca7d3e 27-Jan-2009 Chris Lattner <sabre@nondot.org>

Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things s

Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.

llvm-svn: 63098

show more ...


# 6d61c3e6 27-Jan-2009 Chris Lattner <sabre@nondot.org>

make -print-stats print stats about the amount of the SLoc
address space we used up. Some interesting data:

For c99-intconst-1.c:
6912762 SLocEntry's allocated, 25592386B of Sloc address space use

make -print-stats print stats about the amount of the SLoc
address space we used up. Some interesting data:

For c99-intconst-1.c:
6912762 SLocEntry's allocated, 25592386B of Sloc address space used.

For cocoa.h:
26469 SLocEntry's allocated, 10278752B of Sloc address space used.

For carbon.h:
27364 SLocEntry's allocated, 12398141B of Sloc address space used.

Clearly 2G of sloc address space should be enough for anyone?!

llvm-svn: 63093

show more ...


# 2d86c700 26-Jan-2009 Chris Lattner <sabre@nondot.org>

now that everything properly handles multiply instantiated
source locations, allow creation of them. We can now say that
a token was instantiated here, then here, then here.

llvm-svn: 63034


# 659ac5f0 26-Jan-2009 Chris Lattner <sabre@nondot.org>

make getInstantiationLoc and getSpellingLoc handle multiply instantiated
locations, and move the slow case out of line. No perf change on cocoa.h

llvm-svn: 63033


# 31af4e08 26-Jan-2009 Chris Lattner <sabre@nondot.org>

fix a negated conditional in getDecomposedInstantiationLocSlowCase,
which I think is rdar://6527005, and make getDecomposedSpellingLocSlowCase
handle nested spelling locations.

llvm-svn: 63030


# b5fba6f8 26-Jan-2009 Chris Lattner <sabre@nondot.org>

start plumbing together the line table information. So far we just
unique the Filenames in #line directives, assigning them UIDs.

llvm-svn: 63010


# 43a85b1e 26-Jan-2009 Chris Lattner <sabre@nondot.org>

Lazily paging in file contents is a big win for PTH, strip out the old
testing code.

llvm-svn: 63006


# 4fa23625 26-Jan-2009 Chris Lattner <sabre@nondot.org>

Check in the long promised SourceLocation rewrite. This lays the
ground work for implementing #line, and fixes the "out of macro ID's"
problem.

There is nothing particularly tricky about the code,

Check in the long promised SourceLocation rewrite. This lays the
ground work for implementing #line, and fixes the "out of macro ID's"
problem.

There is nothing particularly tricky about the code, other than the
very performance sensitive SourceManager::getFileID() method.

llvm-svn: 62978

show more ...


1...<<111213141516