Chris Lattner
f5c619f98c
clarify comment, this is undefined behavior in any case, even if it only
...
bits VC++ right now.
llvm-svn: 47565
2008-02-25 21:38:21 +00:00
Ted Kremenek
72be068ab3
Two more Windows-related fixes:
...
- More enum signeness bitfield fixes (MSVC treats enums as signed).
- Fixed in Lex/HeaderSearch.cpp an unsafe copy between two
HeaderSearch::PerFileInfo entries in a common vector. The copy involved two
calls to getFileInfo() within the assignment; these calls could have
side-effects that enlarged the internal vector, and with MSVC this would
invalidate one of the values in the assignment.
Patch by Argiris Kirtzidis!
llvm-svn: 47536
2008-02-24 03:55:14 +00:00
Chris Lattner
1226188e0a
Fix PR1969. stdin has no FileEntry.
...
llvm-svn: 46629
2008-02-01 05:34:02 +00:00
Chris Lattner
5b12ab8c93
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45410
2007-12-29 19:59:25 +00:00
Chris Lattner
4ffe46cbdf
Start reading the headermap header, drop the 'errorstr' argument to
...
the create method.
llvm-svn: 45109
2007-12-17 18:34:53 +00:00
Chris Lattner
8d720d083a
Sink getName into DirectoryLookup to simplify the client in clang.
...
llvm-svn: 45106
2007-12-17 17:57:27 +00:00
Chris Lattner
44bd21b7c1
finish stubbing out support for HeaderMap. Now we just need an implementation!
...
llvm-svn: 45094
2007-12-17 08:17:39 +00:00
Chris Lattner
712e3873a0
refactor an better comment framework lookup code. This moves it from
...
HeaderSearch into DirectoryLookup, as a particular framework lookup is
specific to the directory we are currently querying.
llvm-svn: 45093
2007-12-17 08:13:48 +00:00
Chris Lattner
f62f75895f
as it turns out, frameworks and headermaps are orthogonal. Make this so in
...
the internal representation. This also fixes a bug where -I foo -F foo would
not search foo as both a normal and framework include dir.
llvm-svn: 45092
2007-12-17 07:52:39 +00:00
Chris Lattner
c4ba38ed1e
Step #1 in adding headermap support to clang.
...
llvm-svn: 45089
2007-12-17 06:36:45 +00:00
Chris Lattner
ef6b136781
move IdentifierTable.h from liblex to libbasic.
...
llvm-svn: 42730
2007-10-07 08:58:51 +00:00
Chris Lattner
d7b971bf3d
add a hasMacroDefinition() method to IdentifierInfo, strength reduce a
...
call to getMacroInfo to call it.
llvm-svn: 42725
2007-10-07 07:57:27 +00:00
Chris Lattner
d427542a9b
Implement a simple cache in headersearch. This speeds up
...
preprocessing 483.xalancbmk by about 10%, reducing the number
of file lookup queries from 2139411 to 199466 (over 10x)
llvm-svn: 40390
2007-07-22 07:28:00 +00:00
Chris Lattner
23b7eb677d
Finally bite the bullet and make the major change: split the clang namespace
...
out of the llvm namespace. This makes the clang namespace be a sibling of
llvm instead of being a child.
The good thing about this is that it makes many things unambiguous. The
bad things is that many things in the llvm namespace (notably data structures
like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport
should be split out of llvm into their own namespace in the future, which will fix
this issue.
llvm-svn: 39659
2007-06-15 23:05:46 +00:00
Bill Wendling
44ebec5310
Submitted by: Bill Wendling
...
Removed #include <iostream>.
llvm-svn: 39554
2007-06-02 05:06:35 +00:00
Chris Lattner
23d890337b
Specify an initial size for StringMap.
...
llvm-svn: 39378
2007-04-03 22:14:25 +00:00
Chris Lattner
34d1f5a8de
adjust to CStringMap interface change.
...
llvm-svn: 39333
2007-02-08 19:08:49 +00:00
Chris Lattner
7cdbad945d
Push strings out of the HeaderSearch interface, it now deals solely with
...
character ranges.
llvm-svn: 39090
2006-10-30 05:33:15 +00:00
Chris Lattner
ee7bf89cd6
Change framework cache map from map to CStringMap. This speeds up PP user
...
time on Cocoa.h from 0.078 to 0.077s.
llvm-svn: 39089
2006-10-30 05:19:23 +00:00
Chris Lattner
b201d9b13d
Eliminate string use in DoFrameworkLookup. This speeds up pp of Cocoa.h
...
marginally from 0.079 to 0.078s.
llvm-svn: 39088
2006-10-30 05:09:49 +00:00
Chris Lattner
cf8ddac4bc
Use SmallString instead of string in HeaderSearch::LookupFile. This avoids
...
malloc traffic, speeding up user time preprocessing Carbon.h 5% (0.083s to
0.079s).
llvm-svn: 39087
2006-10-30 04:42:33 +00:00
Chris Lattner
43fd42e4d9
Wean LookupSubframeworkHeader off std::strings, use the new SmallString
...
class instead. SmallString allows to code to avoid hitting malloc in
the normal case (or will, when some other stuff is converted over).
llvm-svn: 39084
2006-10-30 03:40:58 +00:00
Chris Lattner
ffda89611f
Change DirectoryEntry::getName() to return a const char *
...
llvm-svn: 39066
2006-10-27 05:15:55 +00:00
Chris Lattner
480434865d
change FileEntry::getName to return a const char*.
...
llvm-svn: 39065
2006-10-27 05:12:36 +00:00
Chris Lattner
5ed76da296
Implement framework filesystem caching.
...
llvm-svn: 39031
2006-10-22 07:24:13 +00:00
Chris Lattner
641a0be31b
count # framework lookups
...
llvm-svn: 39026
2006-10-20 06:23:14 +00:00
Chris Lattner
577377e847
Speed up [sub]framework searching
...
llvm-svn: 39017
2006-10-20 04:55:45 +00:00
Chris Lattner
63dd32b656
Implement subframework lookup
...
llvm-svn: 39015
2006-10-20 04:42:40 +00:00
Chris Lattner
59a9ebdb17
refactor header searching stuff out of the main Preprocessor object into
...
it's own HeaderSearch object. This makes Preprocessor simpler and easier
to understand.
llvm-svn: 39012
2006-10-18 05:34:33 +00:00