aa93a875605536d72a10359a0098396192b7d4ec |
|
17-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
For modules, all macros that aren't include guards are implicitly public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
7143aab97c6e849a5a5005b7853b8c7d5af008ed |
|
01-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Modules hide macro definitions by default, so that silly things like include guards don't show up as macro definitions in every translation unit that imports a module. Macro definitions can, however, be exported with the intentionally-ugly #__export_macro__ directive. Implement this feature by not even bothering to serialize non-exported macros to a module, because clients of that module need not (should not) know that these macros even exist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
686775deca8b8685eb90801495880e3abdd844c2 |
|
20-Jul-2011 |
Chris Lattner <sabre@nondot.org> |
now that we have a centralized place to do so, add some using declarations for some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
b73377eeb3eff76be134203aebb6068244b177f3 |
|
07-Jul-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Make the Preprocessor more memory efficient and improve macro instantiation diagnostics. When a macro instantiation occurs, reserve a SLocEntry chunk with length the full length of the macro definition source. Set the spelling location of this chunk to point to the start of the macro definition and any tokens that are lexed directly from the macro definition will get a location from this chunk with the appropriate offset. For any tokens that come from argument expansion, '##' paste operator, etc. have their instantiation location point at the appropriate place in the instantiated macro definition (the argument identifier and the '##' token respectively). This improves macro instantiation diagnostics: Before: t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int') int y = M(/); ^~~~ t.c:5:11: note: instantiated from: int y = M(/); ^ After: t.c:5:9: error: invalid operands to binary expression ('struct S' and 'int') int y = M(/); ^~~~ t.c:3:20: note: instantiated from: \#define M(op) (foo op 3); ~~~ ^ ~ t.c:5:11: note: instantiated from: int y = M(/); ^ The memory savings for a candidate boost library that abuses the preprocessor are: - 32% less SLocEntries (37M -> 25M) - 30% reduction in PCH file size (900M -> 635M) - 50% reduction in memory usage for the SLocEntry table (1.6G -> 800M) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
c69a505cfa318d571ce8a0cd038c8d958585a735 |
|
23-Apr-2011 |
Jay Foad <jay.foad@gmail.com> |
Remove unused STL header includes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
0827408865e32789e0ec4b8113a302ccdc531423 |
|
15-Dec-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Fix diagnostic pragmas. Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state. Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect a lot of places, like C++ inline methods, template instantiations, the lexer, etc. Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location. Fixes rdar://8365684. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
3c7f4134603d04b44f997b43c0a9def270f25386 |
|
19-Aug-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
More PCH -> AST renaming. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
2c1ab9079cb117dc0470ab423fe0bc5177546339 |
|
18-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
no need to pass bumppointer allocator into macroinfo::destroy git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
f47724bf78299c7a50f008e0443c5f9f9f279ddc |
|
17-Aug-2010 |
Chris Lattner <sabre@nondot.org> |
Implement #pragma push_macro, patch by Francois Pichet! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
083abdf67f157e9d2ab5a8c9d5e71240479d3c99 |
|
28-Jul-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
Record macros in dependent PCHs. Also add various info tables to dependent PCHs; tests for this to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
2451b528fe114595d0f10ef2c05047928558ab0f |
|
21-Apr-2009 |
Chris Lattner <sabre@nondot.org> |
improve MacroInfo to track the source range of the macro definition, patch by Alexei Svitkine! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
685befeb5f6472585bae473a6389e47cab9eac67 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
switch the macroinfo argument lists from being allocated off the heap to being allocated from the same bumpptr that the MacroInfo objects themselves are. This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
cf29e0716bb3ecbbc15b74cd648367d6b075fdf0 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
detemplatify setArgumentList and some other cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
0301b3ff132a4d986c092d161cb77d74b04cd2a6 |
|
20-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
require the MAcroInfo objects are explcitly destroyed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
f73903a1ded46748e1dfda151f5d037b7b3d31f9 |
|
06-Feb-2009 |
Chris Lattner <sabre@nondot.org> |
Add an implementation of -dM that follows GCC closely enough to permit diffing the output of: clang -dM -o - -E -x c foo.c | sort git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
42e6737f2efb113563140ad794c21c7709250402 |
|
05-Mar-2008 |
Chris Lattner <sabre@nondot.org> |
Remove the first layer of support for "portability" warnings. This is theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
12fe558612303cb2188c321a77a21f7df23b6ae8 |
|
29-Jan-2008 |
Chris Lattner <sabre@nondot.org> |
fix comment typo git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
0bc735ffcfb223c0186419547abaa5c84482663e |
|
29-Dec-2007 |
Chris Lattner <sabre@nondot.org> |
Don't attribute in file headers anymore. See llvmdev for the discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
d217773f106856a11879ec79dc468efefaf2ee75 |
|
20-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
At one point there were going to be lexer and parser tokens. Since that point is now long gone, we should rename LexerToken to Token, as it is the only kind of token we have. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
25c9648909193d380a4e135d2e3d25394ba12922 |
|
15-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
switch function-like macros from using a vector for their arguments to an explicitly new'd array. The array never mutates once created, so a vector is overkill. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
f46f68b5587b6933a92260220567ea7c36924a80 |
|
15-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
switch from using a vector to a smallvector for macro replacement tokens This speeds up parsing carbon.h by 3.3% by avoiding some malloc traffic for small macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
c215bd659d8266a1d6b66ce231a63405a4c61daf |
|
15-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
expose an iterator interface to getReplacementTokens instead of the datastructure itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
9dc62f044a6ba21f503bd56607d94b32704e7945 |
|
12-Jul-2007 |
Chris Lattner <sabre@nondot.org> |
Improve portability to compilers where <cassert> is not implicitly included. Patch contributed by Benoit Boissinot! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|
5f016e2cb5d11daeb237544de1c5d59f20fe1a6e |
|
11-Jul-2007 |
Reid Spencer <rspencer@reidspencer.com> |
Stage two of getting CFE top correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/MacroInfo.h
|