Commit Graph

35690 Commits

Author SHA1 Message Date
Devang Patel 887db2d832 Remove dead code.
llvm-svn: 41295
2007-08-22 21:07:41 +00:00
Ted Kremenek 1c65be13cc Added preliminary support for while loops within source-level CFGs.
Adjusted printing of source-level CFGs to account that the entry block
may not be the first block in the list of blocks a CFG object maintains.

llvm-svn: 41294
2007-08-22 21:05:42 +00:00
Ted Kremenek 88dea224c1 Added explicit pointer within class CFG to the Entry block.
Before we assumed that the first block in the list of blocks was the entry
block, but this has posed hurdles during CFG construction.

llvm-svn: 41293
2007-08-22 21:03:50 +00:00
Devang Patel 6f4f23320d Fix typo.
llvm-svn: 41292
2007-08-22 20:55:18 +00:00
Andrew Lenharth 544fdd27fb update test to check that codegen works with llvm.used in llvm.metadata section
llvm-svn: 41289
2007-08-22 19:36:31 +00:00
Devang Patel 31206b56d5 Cosmetic change
"True Loop" and "False Loop" naming terminology to refer two loops
after loop cloning is confusing. Instead just use A_Loop and B_Loop.

llvm-svn: 41287
2007-08-22 19:33:29 +00:00
Andrew Lenharth beb80a9832 move this check. ppc outputs .no_dead_strip properly
llvm-svn: 41286
2007-08-22 19:33:11 +00:00
Bill Wendling 862afea91e Add the PCSymbol for Darwin x86 platforms.
llvm-svn: 41284
2007-08-22 18:44:05 +00:00
Steve Naroff f1bc45b1d1 Finish up method prototype parsing.
Next step...starting installing class names into the type namespace (so we can start parsing Cocoa headers).

llvm-svn: 41283
2007-08-22 18:35:33 +00:00
Devang Patel 90da534987 Refactor loop condition check in a separate function.
llvm-svn: 41282
2007-08-22 18:27:01 +00:00
Ted Kremenek 7e776b1d9c Added CFG support for: for loops
In CFG dumper, refactored the code to print block terminators into a
StmtVisitor.

Added the method "FinishBlock" to CFGBuilder to do the reversal of statements
in a block instead of calling "reverseStmts" for a block directly.  This
was necessary to fix a bug in how blocks with labels were being processed
(some cases would cause the statements to be reversed twice).  FinishBlock
detects blocks that start with labels and doesn't do a second reversal.

llvm-svn: 41281
2007-08-22 18:22:34 +00:00
Devang Patel cd8beb7645 Fix thinko.
Starting value of second loop's induction variable can not be lower 
then starting value of original loop's induction variable.

llvm-svn: 41280
2007-08-22 18:07:47 +00:00
Steve Naroff 99264b4b04 Add support for parsing method prototypes (and other stuff required by @interface).
Still need to finish Parser::ParseObjCMethodDecl(). Before I do, I need to do a minor
refactoring of ParseDeclarationOrFunctionDefinition(), to disallow function definitions.
At the moment, @inteface allows function defs (which is incorrect).

llvm-svn: 41275
2007-08-22 16:35:03 +00:00
Ted Kremenek de979aeff3 Changed data structure recording the CFG blocks that need to be backpatched
to labeled blocks from a list to a vector.

llvm-svn: 41274
2007-08-22 15:40:58 +00:00
Anders Carlsson c5a81ebb1f Parse @encode expressions.
llvm-svn: 41273
2007-08-22 15:14:15 +00:00
Bill Wendling 9bbecaeb55 Testcase for llvm.c* intrinsic failures.
llvm-svn: 41268
2007-08-22 07:26:30 +00:00
Chris Lattner f265939ebc update todo markers
llvm-svn: 41267
2007-08-22 06:06:56 +00:00
Duncan Sands d9a21103dc Test handling of complex constants as lvalues.
llvm-svn: 41266
2007-08-22 05:58:22 +00:00
Chris Lattner 8f44d20d69 optimize scope push/pop to avoid work in the common case.
llvm-svn: 41265
2007-08-22 05:33:11 +00:00
Chris Lattner 8fb2625b40 Fix the scoping issue Neil pointed out for the rest of
the selection statements and iteration statements.  Add
spec citations.

llvm-svn: 41264
2007-08-22 05:28:50 +00:00
Chris Lattner 37e54f454a Fix a nasty C99 scope issue that Neil pointed out (for ifs)
This fixes test/Parser/control-scope.c

llvm-svn: 41263
2007-08-22 05:16:28 +00:00
Ted Kremenek 8a63218855 Added CFG support for gotos and labels.
Modified CFG so that getEntry(), getExit(), front() and back() return
CFGBlock& instead of CFGBlock*.

llvm-svn: 41258
2007-08-21 23:26:17 +00:00
Anton Korobeynikov 3fc4a9f78a Dror GCCLibraries: they are obsolete since 2.0 release. This also reduces number of licenses used in LLVM.
llvm-svn: 41257
2007-08-21 22:40:44 +00:00
Chris Lattner cb1ffbc12e add some fixme's, implement complex struct members.
llvm-svn: 41256
2007-08-21 22:33:41 +00:00
Chris Lattner d34c999b67 implement codegen for --/++
llvm-svn: 41255
2007-08-21 22:25:29 +00:00
Ted Kremenek 1b8ac851d1 Converted CFGBuilder to use StmtVisitor instead of doing a switch
dispatch to walk the AST.

llvm-svn: 41254
2007-08-21 22:06:14 +00:00
Chris Lattner ce8f75bd5b add cfg.h/cfg.cpp to the xcode project at Ted's request.
llvm-svn: 41253
2007-08-21 21:44:59 +00:00
Ted Kremenek 4aa1e8b3b8 Added CFG infrastructure (CFG.cpp and CFG.h) for clang ASTs.
Added builder code to translate ASTs to CFGs.  This currently supports
if, return, and non-control flow statements.

Added pretty-printer to debug CFGs.

Added a "-dump-cfg" option to the clang driver to dump CFGs for code
sent through the frontend.

llvm-svn: 41252
2007-08-21 21:42:03 +00:00
Steve Naroff 00433d3d37 Implement parsing for objc instance variables.
Next step, method...

llvm-svn: 41251
2007-08-21 21:17:12 +00:00
Devang Patel a12000d572 Rename bunch of variables.
llvm-svn: 41250
2007-08-21 21:12:02 +00:00
Chris Lattner 875a519ca6 implement __extension__ and unary~ for complex.
llvm-svn: 41249
2007-08-21 20:41:44 +00:00
Ted Kremenek 76c4ac2363 Added reverse iterators for the body of CompountStmt. These are useful for
CFG construction (among other potential uses).

llvm-svn: 41248
2007-08-21 20:29:50 +00:00
Chris Lattner ad4569eacb implement codegen for complex unary +/-
llvm-svn: 41247
2007-08-21 20:08:23 +00:00
Devang Patel f98db5e62a Preserve LCSSA.
llvm-svn: 41246
2007-08-21 19:47:46 +00:00
Anders Carlsson 77621351dd Don't remove the grammar construct, just the TODO.
llvm-svn: 41245
2007-08-21 19:18:49 +00:00
Chris Lattner d614e7a553 minor nicities.
llvm-svn: 41244
2007-08-21 18:51:13 +00:00
Chris Lattner 43ba25187b Tweak error recovery for missing semicolon after decl. For this:
void foo() {
  int x
  if (x) {
  }
}

We now emit:

a.c:5:3: error: parse error
  if (x) {
  ^
1 diagnostic generated.

instead of:

a.c:5:3: error: parse error
  if (x) {
  ^
a.c:9:1: error: expected '}'

^
2 diagnostics generated.

llvm-svn: 41243
2007-08-21 18:36:18 +00:00
Chris Lattner 592d757c92 add unary operator support to the stmtvisitor
llvm-svn: 41242
2007-08-21 18:18:25 +00:00
Anders Carlsson 4f803dc6d3 Remove objc-string-literal since it's been implemented now.
llvm-svn: 41241
2007-08-21 18:14:25 +00:00
Chris Lattner a0733a777b implement support for complex subscripts.
llvm-svn: 41240
2007-08-21 18:03:58 +00:00
Chris Lattner e0e54120b2 allow support for volatile lvalues even though it's still not right.
llvm-svn: 41239
2007-08-21 18:02:02 +00:00
Anders Carlsson 76f4a902d7 Implement parsing and code generation of Objective-C string literals.
llvm-svn: 41238
2007-08-21 17:43:55 +00:00
Chris Lattner 2dc2af3515 add a new builder ivar.
llvm-svn: 41237
2007-08-21 17:39:38 +00:00
Chris Lattner 4b0e7873f6 move EmitLoadOfComplex/EmitStoreOfComplex into ComplexExprEmitter.
llvm-svn: 41236
2007-08-21 17:28:34 +00:00
Chris Lattner 3cf417b369 implement comma for complex.
llvm-svn: 41235
2007-08-21 17:15:50 +00:00
Chris Lattner 64be48fede and/or/xor are invalid for complex, even integer complex apparently.
llvm-svn: 41234
2007-08-21 17:12:50 +00:00
Chris Lattner bf1bd0dcc7 simplify code slightly
llvm-svn: 41233
2007-08-21 17:03:38 +00:00
Chris Lattner 755a5a9933 add sema support for complex integer types
llvm-svn: 41232
2007-08-21 17:02:28 +00:00
Chris Lattner 96d7256d62 reimplement support for complex comparisons, add support for integer complex compares.
llvm-svn: 41231
2007-08-21 16:57:55 +00:00
Devang Patel f5e520d892 Use SmallVector.
llvm-svn: 41230
2007-08-21 16:54:51 +00:00