Commit Graph

9 Commits

Author SHA1 Message Date
Chris Lattner 0ea793e5e3 Correctly respect C99 5.1.1.2p4 when searching for the first '(' of
a function-like macro invocation.  Patch contributed by Neil Booth.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 00:07:36 +00:00
Chris Lattner 97ba77cf09 Add a new Preprocessor::AdvanceToTokenCharacter method which, given a sloc
specifying the start of a token and a logical (phase 3) character number,
returns a sloc representing the input character corresponding to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39905 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-16 06:48:38 +00:00
Chris Lattner 9594acf32d Cache macro expander objects to avoid thrashing malloc in heavy expansion situations.
This doesn't significantly improve carbon.h, but it does speed up
INPUTS/macro_pounder_obj.c by 48%



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39864 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-15 00:25:26 +00:00
Chris Lattner 25c9648909 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
2007-07-14 22:46:43 +00:00
Chris Lattner c215bd659d 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
2007-07-14 22:11:41 +00:00
Chris Lattner b5e240fa9e split function-like and object-like macro body parsing to make the
code more obvious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-14 21:54:03 +00:00
Chris Lattner c35717a1b3 remove use of alloca.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39815 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 17:10:38 +00:00
Gabor Greif 7ae5326415 Solaris needs an included header for alloca
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39797 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-13 08:21:39 +00:00
Reid Spencer 5f016e2cb5 Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 17:01:13 +00:00