| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
it did not handle <xyz> headers coming from macro expansions.
This requires special treatment, as the include name is lexed
as multiple tokens, which require reassembly before processing.
llvm-svn: 40418
|
|
|
|
|
|
| |
no functionality changes.
llvm-svn: 40414
|
|
|
|
|
|
|
| |
that required cleaning. If the token required cleaning,
don't include the cleaned tokens in the returned length.
llvm-svn: 40410
|
|
|
|
|
|
|
| |
Since that point is now long gone, we should rename LexerToken to
Token, as it is the only kind of token we have.
llvm-svn: 40105
|
|
|
|
|
|
| |
buffer*.
llvm-svn: 40104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fileid/offset pair, it now contains a bit discriminating between
mapped locations and file locations. This separates the tables for
macros and files in SourceManager, and allows better separation of
concepts in the rest of the compiler. This allows us to have *many*
macro instantiations before running out of 'addressing space'.
This is also more efficient, because testing whether something is a
macro expansion is now a bit test instead of a table lookup (which
also used to require having a srcmgr around, now it doesn't).
This is fully functional, but there are several refinements and
optimizations left.
llvm-svn: 40103
|
|
|
|
|
|
|
|
|
|
| |
#define t(x) #x
t(a
c)
to "a c", not "ac".
llvm-svn: 40060
|
|
|
|
|
|
| |
a function-like macro invocation. Patch contributed by Neil Booth.
llvm-svn: 40026
|
|
|
|
|
|
|
| |
specifying the start of a token and a logical (phase 3) character number,
returns a sloc representing the input character corresponding to it.
llvm-svn: 39905
|
|
|
|
|
|
|
|
|
| |
situations.
This doesn't significantly improve carbon.h, but it does speed up
INPUTS/macro_pounder_obj.c by 48%
llvm-svn: 39864
|
|
|
|
|
|
|
| |
explicitly new'd array. The array never mutates once created, so a vector
is overkill.
llvm-svn: 39862
|
|
|
|
|
|
| |
datastructure itself.
llvm-svn: 39860
|
|
|
|
|
|
| |
code more obvious.
llvm-svn: 39859
|
|
|
|
| |
llvm-svn: 39815
|
|
|
|
| |
llvm-svn: 39797
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
int test(int X, short Y, float Z) {
return (int)(X*Y+Z);
}
to:
define i32 @test(i32 %X, i16 %Y, float %Z) {
entry:
%promote = sext i16 %Y to i32 ; <i32> [#uses=1]
%mul = mul i32 %promote, %X ; <i32> [#uses=1]
%promote3 = sitofp i32 %mul to float ; <float> [#uses=1]
%add = add float %promote3, %Z ; <float> [#uses=1]
%conv = fptosi float %add to i32 ; <i32> [#uses=1]
ret i32 %conv
}
with:
$ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis
llvm-svn: 39652
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Submitted by:
Reviewed by:
Implement semantic analysis for vector_size attribute!
We now produce the following diagnostics...
[administrators-powerbook59:~/llvm/tools/clang] admin% ../../Debug/bin/clang vector.c
vector.c:2:29: error: attribute requires precisely 1 argument
typedef int __attribute__(( vector_size )) tVecp;
^
vector.c:7:32: error: attribute requires precisely 1 argument
extern int foo __attribute__(( vector_size ));
^
vector.c:8:34: error: attribute requires precisely 1 argument
extern float bar __attribute__(( vector_size(16,18) ));
^
vector.c:11:34: error: vector_size requires integer constant (attribute ignored)
extern char foo2 __attribute__(( vector_size(16.2) ));
^ ~~~~
vector.c:21:47: error: invalid vector type 'struct s'
struct s { int a; } structVar __attribute__(( vector_size(16) ));
llvm-svn: 39643
|
|
|
|
|
|
| |
etc.
llvm-svn: 39447
|
|
|
|
| |
llvm-svn: 39426
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
like this:
t3.c:5:10: error: 'vers2.h' file not found
#include xstr(INCFILE(2).h)
^
instead of:
t3.c:5:10: error: file not found
#include xstr(INCFILE(2).h)
^
which is useful if the #include name is generated through macro expansion.
llvm-svn: 39398
|
|
|
|
| |
llvm-svn: 39336
|
|
|
|
| |
llvm-svn: 39334
|
|
|
|
| |
llvm-svn: 39333
|
|
|
|
| |
llvm-svn: 39218
|
|
|
|
| |
llvm-svn: 39216
|
|
|
|
| |
llvm-svn: 39214
|
|
|
|
|
|
| |
state, not aspects of the language standard being parsed.
llvm-svn: 39209
|
|
|
|
| |
llvm-svn: 39208
|
|
|
|
|
|
|
| |
of having a loose collection of function pointers. This also allows clients to
maintain state, and reduces the size of the Preprocessor.h interface.
llvm-svn: 39203
|
|
|
|
| |
llvm-svn: 39127
|
|
|
|
|
|
|
|
|
| |
filenames (and also '#pragma GCC dependency' of course). Now, assuming
no cleaning is needed, we can go all the way from lexing the filename to
doing filename lookups with no mallocs. This speeds up user PP time from
0.077 to 0.075s for Cocoa.h (2.6%).
llvm-svn: 39092
|
|
|
|
|
|
| |
This avoids some copying in its clients.
llvm-svn: 39091
|
|
|
|
|
|
| |
character ranges.
llvm-svn: 39090
|
|
|
|
|
|
| |
libsupport. Now it can be used for other things besides identifier hashing.
llvm-svn: 39079
|
|
|
|
| |
llvm-svn: 39069
|
|
|
|
| |
llvm-svn: 39034
|
|
|
|
| |
llvm-svn: 39022
|
|
|
|
| |
llvm-svn: 39021
|
|
|
|
| |
llvm-svn: 39015
|
|
|
|
| |
llvm-svn: 39014
|
|
|
|
|
|
|
| |
it's own HeaderSearch object. This makes Preprocessor simpler and easier
to understand.
llvm-svn: 39012
|
|
|
|
| |
llvm-svn: 39011
|
|
|
|
| |
llvm-svn: 39003
|
|
|
|
|
|
| |
IdentifierTable, instead of making them resort to strcmp'ing.
llvm-svn: 39002
|
|
|
|
| |
llvm-svn: 38997
|
|
|
|
| |
llvm-svn: 38984
|
|
|
|
| |
llvm-svn: 38980
|
|
|
|
|
|
| |
used in a target set where the size is not identical.
llvm-svn: 38975
|
|
|
|
| |
llvm-svn: 38969
|