Commit Graph

33621 Commits

Author SHA1 Message Date
Chris Lattner 08e0035668 ignore cruft
llvm-svn: 38656
2006-07-04 19:03:05 +00:00
Chris Lattner 0e1cf1f588 Fix indentation
llvm-svn: 38655
2006-07-04 18:53:52 +00:00
Chris Lattner b9d90f709e Detect expressions semantically equivalent to !defined(X) for the multiple-include
optimization.

llvm-svn: 38654
2006-07-04 18:32:03 +00:00
Chris Lattner 3153ed6bc4 This is implemented.
llvm-svn: 38653
2006-07-04 18:31:48 +00:00
Chris Lattner e3519cc948 Change EvaluateValue/EvaluateDirectiveSubExpr to be static functions in
PPExpressions.cpp instead of methods.

llvm-svn: 38652
2006-07-04 18:11:39 +00:00
Chris Lattner 8096542744 refactor code a little, no functionality change
llvm-svn: 38651
2006-07-04 18:03:19 +00:00
Chris Lattner c79f6fb108 Rename IdentifierTokenInfo -> IdentifierInfo.
llvm-svn: 38650
2006-07-04 17:53:21 +00:00
Chris Lattner a8654ca2cf Eliminate MultipleIncludeOpt::ReadDirective and all calls to it. Any directives
that are lexed are made up of tokens, so the calls are just ugly and redundant.

Hook up the MIOpt for the #if case.  PPCExpressions doesn't currently implement
the hook though, so we still don't handle #if !defined(X) with the MIOpt.

llvm-svn: 38649
2006-07-04 17:42:08 +00:00
Chris Lattner 1f62777508 update
llvm-svn: 38648
2006-07-04 17:34:01 +00:00
Chris Lattner 3665f161ca Implement the multiple-include file optimization.
llvm-svn: 38647
2006-07-04 07:26:10 +00:00
Chris Lattner 371ac8a9b7 Implement the automaton for recognizing files with controlling macros.
llvm-svn: 38646
2006-07-04 07:11:10 +00:00
Chris Lattner d7dfa57efd cleanup fixme's
llvm-svn: 38645
2006-07-04 04:50:35 +00:00
Chris Lattner 062a0d620b stub out built-in macros.
llvm-svn: 38644
2006-07-04 04:50:29 +00:00
Chris Lattner 01d66cc891 Implement #ident and #sccs
llvm-svn: 38643
2006-07-03 22:16:27 +00:00
Chris Lattner 3ae68307ac Print tokens using the logical location. This implements
test/Preprocessor/_Pragma-dependency.c

llvm-svn: 38642
2006-07-03 06:28:56 +00:00
Chris Lattner 1c9c0d0749 new testcase
llvm-svn: 38641
2006-07-03 06:28:30 +00:00
Chris Lattner b085f937a0 The location of a _Pragma expanded token is the location of the string, not the
_Pragma token

llvm-svn: 38640
2006-07-03 06:10:36 +00:00
Chris Lattner d7de629c32 Move a method inline
llvm-svn: 38639
2006-07-03 06:05:41 +00:00
Chris Lattner a78a97e82f #ifdef X, #ifndef X, and #if defined(X) all mark X as used.
llvm-svn: 38638
2006-07-03 05:42:18 +00:00
Chris Lattner bd07659488 Move a PragmaNamespace method out of line, add class comment for PragmaNamespace.
llvm-svn: 38637
2006-07-03 05:34:49 +00:00
Chris Lattner 2e1553070e Move a PragmaNamespace method out of line.
llvm-svn: 38636
2006-07-03 05:34:41 +00:00
Chris Lattner 83913dde23 remove dead var
llvm-svn: 38635
2006-07-03 05:31:31 +00:00
Chris Lattner f88c53a02f Fix test/Preprocessor/_Pragma-syshdr2.c.
llvm-svn: 38634
2006-07-03 05:26:05 +00:00
Chris Lattner 45197e935c new testcase
llvm-svn: 38633
2006-07-03 05:25:52 +00:00
Chris Lattner 13044d942d Implement -Wunused-macros functionality.
llvm-svn: 38632
2006-07-03 05:16:44 +00:00
Chris Lattner cbd6d3e0ed Implement -Wunused-macros functionality, currently always enabled.
llvm-svn: 38631
2006-07-03 05:16:39 +00:00
Chris Lattner 4ec473f871 Add support to track the real top-level file.
llvm-svn: 38630
2006-07-03 05:16:05 +00:00
Chris Lattner 040a4ab71e Compile without rtti or exceptions.
llvm-svn: 38629
2006-07-03 05:01:42 +00:00
Chris Lattner 91cbf11c10 Add a new IdentifierVisitor class and a new IdentifierTable::VisitIdentifiers
method to support iteration over all identifiers.

llvm-svn: 38628
2006-07-03 04:28:52 +00:00
Chris Lattner 44f8a66bcc Fix test/Preprocessor/macro_defined.c, factor some code.
llvm-svn: 38627
2006-07-03 01:27:27 +00:00
Chris Lattner d94adee36d new testcase
llvm-svn: 38626
2006-07-03 01:26:39 +00:00
Chris Lattner aaf09115c4 Implement a FIXME: reject '#define defined'.
llvm-svn: 38625
2006-07-03 01:17:59 +00:00
Chris Lattner e3e81ea8aa Refactor some code into a new Lexer::Stringify method.
llvm-svn: 38624
2006-07-03 01:13:26 +00:00
Chris Lattner d1236047a9 Correctly stringify emitted #line directives in -E mode.
llvm-svn: 38623
2006-07-03 01:12:52 +00:00
Chris Lattner 0766e592ce Implement a FIXME: correctly stringify filenames generated by __LINE__.
llvm-svn: 38622
2006-07-03 01:07:01 +00:00
Chris Lattner 4d5e1a72f4 Classify fixme's
llvm-svn: 38621
2006-07-03 01:01:29 +00:00
Chris Lattner 505c547b8e Cleanup fixme comments
llvm-svn: 38620
2006-07-03 00:55:48 +00:00
Chris Lattner 98a5312478 Give tokens expanded from _Pragma directives correct source locations.
This implements test/Preprocessor/_Pragma-location.c

llvm-svn: 38619
2006-07-02 23:00:20 +00:00
Chris Lattner e55e11ad04 new testcase
llvm-svn: 38618
2006-07-02 22:59:48 +00:00
Chris Lattner a37664b3fb Move a virtual method out-of-line
llvm-svn: 38617
2006-07-02 22:45:51 +00:00
Chris Lattner b694ba7b40 Move some Pragma-related methods from Preprocessor.cpp to Pragma.cpp
llvm-svn: 38616
2006-07-02 22:41:36 +00:00
Chris Lattner 1840e491dc Remove Lexer::BufferStart, an unneeded instance var.
llvm-svn: 38615
2006-07-02 22:30:01 +00:00
Chris Lattner 8bbfe46475 Fix Preprocessor/_Pragma-physloc.c, by making sure that the returned location
of the token is relative to the start of the buffer, not relative to the start
position of the lexer.

llvm-svn: 38614
2006-07-02 22:27:49 +00:00
Chris Lattner 20fc36c416 new testcase
llvm-svn: 38613
2006-07-02 22:27:09 +00:00
Chris Lattner 5599d5f6b8 Fix test/Preprocessor/pragma_unknown.c
llvm-svn: 38612
2006-07-02 21:50:38 +00:00
Chris Lattner a7e7e2b92d new testcase
llvm-svn: 38611
2006-07-02 21:50:31 +00:00
Chris Lattner e4af3ac6b4 Fix some minor issues with _Pragma
llvm-svn: 38610
2006-07-02 21:32:47 +00:00
Chris Lattner ecfeafe3ba Fix some minor bugs handling _Pragma, including
test/Preprocessor/_Pragma_syshdr.c

llvm-svn: 38609
2006-07-02 21:26:45 +00:00
Chris Lattner d6178a6870 new testcase
llvm-svn: 38608
2006-07-02 21:23:03 +00:00
Chris Lattner ef0dbae5ab remove dead ivar
llvm-svn: 38607
2006-07-02 21:17:13 +00:00