Chris Lattner
289ab7bb1d
rename SemaDecl.cpp/h to SemaDeclSpec.cpp/h
...
llvm-svn: 39149
2006-11-08 06:54:53 +00:00
Chris Lattner
b26b665742
rename these methods so that they read correctly.
...
llvm-svn: 39148
2006-11-08 06:10:32 +00:00
Chris Lattner
3503cefbba
split ParseStringExpr into semantic/minimal actions
...
llvm-svn: 39147
2006-11-08 06:03:59 +00:00
Chris Lattner
87ca807e15
add Type.h to the project
...
llvm-svn: 39146
2006-11-08 06:03:37 +00:00
Chris Lattner
257aae5b47
add a note
...
llvm-svn: 39145
2006-11-08 06:03:16 +00:00
Chris Lattner
bacf0bfe45
add a note
...
llvm-svn: 39144
2006-11-08 05:53:27 +00:00
Chris Lattner
e030db6901
Structure for the type representation.
...
llvm-svn: 39143
2006-11-08 05:45:01 +00:00
Chris Lattner
6e544a9cca
Fix an oversight: for modules with no other identifying target info,
...
the sparc backend should be preferred when running on sparcs.
llvm-svn: 39142
2007-07-11 16:32:10 +00:00
Chris Lattner
f89b50c38d
init std::string with it's default ctor instead of "".
...
llvm-svn: 39141
2006-11-06 06:37:47 +00:00
Chris Lattner
034a18c3d2
use default ctor
...
llvm-svn: 39140
2006-11-06 06:33:29 +00:00
Chris Lattner
168f349036
this is not a converting ctor
...
llvm-svn: 39139
2006-11-06 06:31:59 +00:00
Chris Lattner
b6a0e1781f
implement trivial scope caching. This reduces malloc traffic in the common
...
case, speeding up parsing of this contrived example:
#define A {{}}
#define B A A A A A A A A A A
#define C B B B B B B B B B B
#define D C C C C C C C C C C
#define E D D D D D D D D D D
#define F E E E E E E E E E E
#define G F F F F F F F F F F
#define H G G G G G G G G G G
void foo() {
H
}
from 7.478s to 4.321s. GCC requires 8.2s.
llvm-svn: 39138
2006-11-06 00:22:42 +00:00
Chris Lattner
1576870356
pretty print postfix ++/-- nicer
...
llvm-svn: 39137
2006-11-05 23:54:51 +00:00
Chris Lattner
33ad2cacc9
Make Scope keep track of the kind of scope it is. Properly scope loop and
...
switch statements. Make break/continue check that they are inside of an
appropriate control-flow construct. This implements Parser/bad-control.c.
llvm-svn: 39136
2006-11-05 23:47:55 +00:00
Chris Lattner
c19ddcd6dd
rename EmptyAction.cpp -> MinimalAction.cpp
...
llvm-svn: 39135
2006-11-05 18:46:16 +00:00
Chris Lattner
c62b6c232f
eliminate EmptyAction, merging it into MinimalAction instead.
...
llvm-svn: 39134
2006-11-05 18:44:26 +00:00
Chris Lattner
0663d2afd9
start factoring actions into two flavors: minimal and semantic actions.
...
llvm-svn: 39133
2006-11-05 18:39:59 +00:00
Chris Lattner
a6198b4e33
typographical tweaks
...
llvm-svn: 39132
2006-11-05 18:05:21 +00:00
Chris Lattner
ca96b89772
rename some options
...
llvm-svn: 39131
2006-11-05 18:00:10 +00:00
Chris Lattner
f78e6035da
move some content around to make README more focused
...
llvm-svn: 39130
2006-11-05 17:54:43 +00:00
Chris Lattner
9fe24d75d2
for now -fsyntax-only builds all the AST's but doesn't print them.
...
llvm-svn: 39129
2006-11-05 07:59:55 +00:00
Chris Lattner
c95c8f2356
Fix a bug
...
llvm-svn: 39128
2006-11-05 07:59:22 +00:00
Chris Lattner
cf6bc66421
silence some warnings when asserts are disabled.
...
llvm-svn: 39127
2006-11-05 07:59:08 +00:00
Chris Lattner
7ad0fbe1f2
rename a bunch of files for better consistency
...
llvm-svn: 39126
2006-11-05 07:46:30 +00:00
Chris Lattner
7014fb8f07
need to add scope for arguments, but now is not the right time.
...
llvm-svn: 39125
2006-11-05 07:36:23 +00:00
Chris Lattner
da59c2f161
Move objc productions to their own .cpp file.
...
llvm-svn: 39124
2006-11-05 02:08:13 +00:00
Chris Lattner
40f16b5d26
improve objc comments
...
llvm-svn: 39123
2006-11-05 02:05:37 +00:00
Chris Lattner
36ad123dea
print indirect goto correctly
...
llvm-svn: 39122
2006-11-05 01:51:06 +00:00
Chris Lattner
16976d3e83
build ast nodes and print goto/goto*/break/continue.
...
llvm-svn: 39121
2006-11-05 01:46:01 +00:00
Chris Lattner
6c0ff13761
Add ast node support for case/default/label stmts.
...
llvm-svn: 39120
2006-11-05 00:19:50 +00:00
Chris Lattner
f2174b633b
implement AST node for switch stmt
...
llvm-svn: 39119
2006-11-04 20:59:27 +00:00
Chris Lattner
76af84462c
use the StmtNodes.def database to eliminate redundant code.
...
llvm-svn: 39118
2006-11-04 20:54:18 +00:00
Chris Lattner
6fef2fb277
Add a new StmtNodes.def file as a catalog of all the Stmt's. This helps
...
eliminate repetitive code.
llvm-svn: 39117
2006-11-04 20:49:30 +00:00
Chris Lattner
85ed873bdc
implement ast nodes for while and do loops
...
llvm-svn: 39116
2006-11-04 20:40:44 +00:00
Chris Lattner
301cd76b8c
silence warning
...
llvm-svn: 39115
2006-11-04 20:32:01 +00:00
Chris Lattner
5d8f494c00
pretty print strings more nicely
...
llvm-svn: 39114
2006-11-04 20:29:31 +00:00
Chris Lattner
71e23ce2e1
Add AST node, AST building, actions, and printing for 'for' stmts.
...
llvm-svn: 39113
2006-11-04 20:18:38 +00:00
Chris Lattner
eb2feefb46
implement some todo's: invoke the actions module for identifiers leading
...
expressions in stmt contexts.
llvm-svn: 39112
2006-11-04 19:14:32 +00:00
Chris Lattner
882f788ef4
Implement the rest of the printer, restoring parity of functionality.
...
llvm-svn: 39111
2006-11-04 18:52:07 +00:00
Chris Lattner
9277aeb5c1
add accessors to ast nodes, remove VisitNull method from the visitor which is dead
...
llvm-svn: 39110
2006-11-04 18:51:16 +00:00
Chris Lattner
a3bcb7a104
start converting dumper to be a simple visitor
...
llvm-svn: 39109
2006-11-04 07:16:25 +00:00
Chris Lattner
9ea960a220
make visit methods take a reference to a visitor instead of a pointer.
...
Remove all dump_impl methods from Stmt subclasses
llvm-svn: 39108
2006-11-04 07:16:04 +00:00
Chris Lattner
72b7d39d78
remove full locinfo AST nodes for now. They just clutter the implementation
...
and should be implemented with an ASTBuilder subclass anyway.
llvm-svn: 39107
2006-11-04 06:37:16 +00:00
Chris Lattner
2ebe646f00
new file
...
llvm-svn: 39106
2006-11-04 06:33:06 +00:00
Chris Lattner
469d357425
implement visitor chaining.
...
llvm-svn: 39105
2006-11-04 06:32:52 +00:00
Chris Lattner
5e9a878126
add a new StmtVisitor class for traversing Stmt/Expr nodes.
...
llvm-svn: 39104
2006-11-04 06:21:51 +00:00
Chris Lattner
834618de6f
replace some ugly alloca/malloc code with a couple of SmallString's.
...
llvm-svn: 39103
2006-11-03 07:48:41 +00:00
Chris Lattner
57dd8360f6
implement FIXME: replace use of alloca with use of SmallVector.
...
llvm-svn: 39102
2006-11-03 07:45:04 +00:00
Chris Lattner
64b09ee57a
improve comment, fit to 80 cols
...
llvm-svn: 39101
2006-11-03 07:35:12 +00:00
Chris Lattner
70058dda70
Emit:
...
test.m:2:14: error: expected ';' after @class
@ class foo int x;
^
instead of silently accepting the malformed input.
llvm-svn: 39100
2006-11-03 07:32:21 +00:00