|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| ... |  | 
| | 
| 
| 
| | llvm-svn: 65641 | 
| | 
| 
| 
| | llvm-svn: 65582 | 
| | 
| 
| 
| | llvm-svn: 65348 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | 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.
llvm-svn: 65195 | 
| | 
| 
| 
| | llvm-svn: 65187 | 
| | 
| 
| 
| | llvm-svn: 65179 | 
| | 
| 
| 
| | llvm-svn: 65072 | 
| | 
| 
| 
| | llvm-svn: 65071 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | t.c:1:10: error: missing terminating '>' character
#include <stdio.h
         ^
instead of:
t.c:1:10: error: missing terminating " character
#include <stdio.h
         ^
llvm-svn: 65052 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | escapes in the string for subtoken positioning.  This gives
us working examples like:
t.m:5:16: warning: field width should have type 'int', but argument has type 'unsigned int'
  printf("\n\n%*d", (unsigned) 1, 1);
               ^    ~~~~~~~~~~~~
where before the caret pointed two spaces to the left.
llvm-svn: 64940 | 
| | 
| 
| 
| | llvm-svn: 64939 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | We now emit:
t.m:6:15: warning: field width should have type 'int', but argument has type 'unsigned int'
  printf(STR, (unsigned) 1, 1);
         ^    ~~~~~~~~~~~~
t.m:3:18: note: instantiated from:
#define STR "abc%*ddef"
                 ^
which has the correct location in the string literal in the note line.
llvm-svn: 64936 | 
| | 
| 
| 
| | llvm-svn: 64642 | 
| | 
| 
| 
| | llvm-svn: 64634 | 
| | 
| 
| 
| | llvm-svn: 64606 | 
| | 
| 
| 
| 
| 
| 
| 
| | *end* of a macro instantiation, not the start of it.  This is
really all about bug-for-bug compatibility with GCC, but not
doing this breaks the FreeBSD kernel.
llvm-svn: 64604 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| | llvm-svn: 64503 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| | a target.
Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this.
On linux/32, set intptr_t to int, instead of long.  This fixes PR3563.
llvm-svn: 64495 | 
| | 
| 
| 
| 
| 
| | performance improvement on Cocoa.h (fsyntax-only+PTH).
llvm-svn: 64490 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | wine sources.  This was happening because HighlightMacros was 
calling EnterMainFile multiple times on the same preprocessor
object and getting an assert due to the new #line stuff (the
file in question was bison output with #line directives).
The fix for this is to not reenter the file.  Instead, 
relex the tokens in raw mode, swizzle them a bit and repreprocess
the token stream.  An added bonus of this is that rewrite macros
will now hilight the macro definition as well as its uses.  Woo.
llvm-svn: 64480 | 
| | 
| 
| 
| 
| 
| | directories (and negative stats too).
llvm-svn: 64477 | 
| | 
| 
| 
| | llvm-svn: 64455 | 
| | 
| 
| 
| 
| 
| | type doesn't do anything.
llvm-svn: 64424 | 
| | 
| 
| 
| 
| 
| | PrintPreprocessedOutput into its own file.  No functionality change.
llvm-svn: 64418 | 
| | 
| 
| 
| | llvm-svn: 64397 | 
| | 
| 
| 
| | llvm-svn: 64356 | 
| | 
| 
| 
| | llvm-svn: 64355 | 
| | 
| 
| 
| 
| 
| | machines.
llvm-svn: 64354 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | to use this stat information in the PTH file using a 'StatSysCallCache' object.
Performance impact (Cocoa.h, PTH):
- number of stat calls reduces from 1230 to 425
- fsyntax-only: time improves by 4.2% 
We can reduce the number of stat calls to almost zero by caching negative stat
calls and directory stat calls in the PTH file as well.
llvm-svn: 64353 | 
| | 
| 
| 
| | llvm-svn: 64338 | 
| | 
| 
| 
| 
| 
| 
| | actually *slightly* slower than the binary search. Since this is algorithmically
better, further performance tuning should be able to make this faster.
llvm-svn: 64326 | 
| | 
| 
| 
| 
| 
| | referenced by other tables.
llvm-svn: 64304 | 
| | 
| 
| 
| 
| 
| | with an on-disk chained hash table.  This data structure is implemented using templates, and will be used to replace similar data structures.  This change leads to no visibile performance impact on Cocoa.h, but now we only pay a price for the table on order with the number of files accessed and not the number in the PTH file.
llvm-svn: 64245 | 
| | 
| 
| 
| 
| 
| 
| | in a gcc 4.5 compatible way so that stdint.h can follow the compiler's 
notion of types.
llvm-svn: 63976 | 
| | 
| 
| 
| | llvm-svn: 63942 | 
| | 
| 
| 
| 
| 
| 
| | diffing the output of:
  clang -dM -o - -E -x c foo.c | sort
llvm-svn: 63926 | 
| | 
| 
| 
| | llvm-svn: 63925 | 
| | 
| 
| 
| | llvm-svn: 63920 | 
| | 
| 
| 
| 
| 
| | predefines buffer initialization.
llvm-svn: 63919 | 
| | 
| 
| 
| 
| 
| | Now you too can have a 47 bit long long!
llvm-svn: 63918 | 
| | 
| 
| 
| | llvm-svn: 63917 | 
| | 
| 
| 
| | llvm-svn: 63848 | 
| | 
| 
| 
| | llvm-svn: 63846 | 
| | 
| 
| 
| 
| 
| | buffer as if the #include happened from the main file.
llvm-svn: 63764 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | 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 | 
| | 
| 
| 
| 
| 
| | ignoring include stack push/pop info though.
llvm-svn: 63719 | 
| | 
| 
| 
| | llvm-svn: 63667 | 
| | 
| 
| 
| 
| 
| | redundant #includes.  Patch by Anders Johnsen!
llvm-svn: 63271 | 
| | 
| 
| 
| | llvm-svn: 63232 |