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  
				
					
						
							
							
								 
						
							
								83913dde23 
								
							 
						 
						
							
							
								
								remove dead var  
							
							... 
							
							
							
							llvm-svn: 38635 
							
						 
						
							2006-07-03 05:31:31 +00:00  
				
					
						
							
							
								 
						
							
								f88c53a02f 
								
							 
						 
						
							
							
								
								Fix test/Preprocessor/_Pragma-syshdr2.c.  
							
							... 
							
							
							
							llvm-svn: 38634 
							
						 
						
							2006-07-03 05:26:05 +00:00  
				
					
						
							
							
								 
						
							
								13044d942d 
								
							 
						 
						
							
							
								
								Implement -Wunused-macros functionality.  
							
							... 
							
							
							
							llvm-svn: 38632 
							
						 
						
							2006-07-03 05:16:44 +00:00  
				
					
						
							
							
								 
						
							
								44f8a66bcc 
								
							 
						 
						
							
							
								
								Fix test/Preprocessor/macro_defined.c, factor some code.  
							
							... 
							
							
							
							llvm-svn: 38627 
							
						 
						
							2006-07-03 01:27:27 +00:00  
				
					
						
							
							
								 
						
							
								aaf09115c4 
								
							 
						 
						
							
							
								
								Implement a FIXME: reject '#define defined'.  
							
							... 
							
							
							
							llvm-svn: 38625 
							
						 
						
							2006-07-03 01:17:59 +00:00  
				
					
						
							
							
								 
						
							
								e3e81ea8aa 
								
							 
						 
						
							
							
								
								Refactor some code into a new Lexer::Stringify method.  
							
							... 
							
							
							
							llvm-svn: 38624 
							
						 
						
							2006-07-03 01:13:26 +00:00  
				
					
						
							
							
								 
						
							
								0766e592ce 
								
							 
						 
						
							
							
								
								Implement a FIXME: correctly stringify filenames generated by __LINE__.  
							
							... 
							
							
							
							llvm-svn: 38622 
							
						 
						
							2006-07-03 01:07:01 +00:00  
				
					
						
							
							
								 
						
							
								4d5e1a72f4 
								
							 
						 
						
							
							
								
								Classify fixme's  
							
							... 
							
							
							
							llvm-svn: 38621 
							
						 
						
							2006-07-03 01:01:29 +00:00  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								a37664b3fb 
								
							 
						 
						
							
							
								
								Move a virtual method out-of-line  
							
							... 
							
							
							
							llvm-svn: 38617 
							
						 
						
							2006-07-02 22:45:51 +00:00  
				
					
						
							
							
								 
						
							
								b694ba7b40 
								
							 
						 
						
							
							
								
								Move some Pragma-related methods from Preprocessor.cpp to Pragma.cpp  
							
							... 
							
							
							
							llvm-svn: 38616 
							
						 
						
							2006-07-02 22:41:36 +00:00  
				
					
						
							
							
								 
						
							
								1840e491dc 
								
							 
						 
						
							
							
								
								Remove Lexer::BufferStart, an unneeded instance var.  
							
							... 
							
							
							
							llvm-svn: 38615 
							
						 
						
							2006-07-02 22:30:01 +00:00  
				
					
						
							
							
								 
						
							
								e4af3ac6b4 
								
							 
						 
						
							
							
								
								Fix some minor issues with _Pragma  
							
							... 
							
							
							
							llvm-svn: 38610 
							
						 
						
							2006-07-02 21:32:47 +00:00  
				
					
						
							
							
								 
						
							
								ecfeafe3ba 
								
							 
						 
						
							
							
								
								Fix some minor bugs handling _Pragma, including  
							
							... 
							
							
							
							test/Preprocessor/_Pragma_syshdr.c
llvm-svn: 38609 
							
						 
						
							2006-07-02 21:26:45 +00:00  
				
					
						
							
							
								 
						
							
								69772b026e 
								
							 
						 
						
							
							
								
								Implement the _Pragma-style of pragma handling, implementing  
							
							... 
							
							
							
							test/Preprocessor/_Pragma-poison.c.
This unifies the MacroStack and IncludeStack together into IncludeMacroStack.
llvm-svn: 38606 
							
						 
						
							2006-07-02 20:34:39 +00:00  
				
					
						
							
							
								 
						
							
								847e0e4552 
								
							 
						 
						
							
							
								
								Implement __TIMESTAMP__  
							
							... 
							
							
							
							llvm-svn: 38602 
							
						 
						
							2006-07-01 23:49:16 +00:00  
				
					
						
							
							
								 
						
							
								c1283b90a0 
								
							 
						 
						
							
							
								
								Implement __INCLUDE_LEVEL__ and __BASE_FILE__  
							
							... 
							
							
							
							llvm-svn: 38601 
							
						 
						
							2006-07-01 23:16:30 +00:00  
				
					
						
							
							
								 
						
							
								630b33c39e 
								
							 
						 
						
							
							
								
								Implement __FILE__  
							
							... 
							
							
							
							llvm-svn: 38600 
							
						 
						
							2006-07-01 22:46:53 +00:00  
				
					
						
							
							
								 
						
							
								c673f905d8 
								
							 
						 
						
							
							
								
								Implement the __TIME__ and __DATE__ builtin macros.  
							
							... 
							
							
							
							llvm-svn: 38597 
							
						 
						
							2006-06-30 06:10:41 +00:00  
				
					
						
							
							
								 
						
							
								4fb517bea8 
								
							 
						 
						
							
							
								
								Give tokens from the scratch buffer correct source locations.  
							
							... 
							
							
							
							llvm-svn: 38591 
							
						 
						
							2006-06-29 06:34:53 +00:00  
				
					
						
							
							
								 
						
							
								0b8cfc2e69 
								
							 
						 
						
							
							
								
								Implement the __LINE__ builtin macro.  
							
							... 
							
							
							
							llvm-svn: 38589 
							
						 
						
							2006-06-28 06:49:17 +00:00  
				
					
						
							
							
								 
						
							
								677757a2c0 
								
							 
						 
						
							
							
								
								Remove dead variables.  
							
							... 
							
							
							
							Add initial support for builtin macros, including warning if they are defined or undefined.
Register __LINE__ as a builtin macro.
llvm-svn: 38586 
							
						 
						
							2006-06-28 05:26:32 +00:00  
				
					
						
							
							
								 
						
							
								f373a4af56 
								
							 
						 
						
							
							
								
								Refactor HandleIdentifier to pull macro expansion into its own method.  
							
							... 
							
							
							
							llvm-svn: 38583 
							
						 
						
							2006-06-26 06:16:29 +00:00  
				
					
						
							
							
								 
						
							
								f4449e5da3 
								
							 
						 
						
							
							
								
								Allow expansion to single token identifiers if they are not macros  
							
							... 
							
							
							
							llvm-svn: 38581 
							
						 
						
							2006-06-26 04:55:25 +00:00  
				
					
						
							
							
								 
						
							
								67b07cb6fe 
								
							 
						 
						
							
							
								
								Implement Preprocessor/macro_expandloc.c by giving the optimized macro  
							
							... 
							
							
							
							expansion case a correct source location.
llvm-svn: 38580 
							
						 
						
							2006-06-26 02:03:42 +00:00  
				
					
						
							
							
								 
						
							
								236ed5200b 
								
							 
						 
						
							
							
								
								Add a note  
							
							... 
							
							
							
							llvm-svn: 38578 
							
						 
						
							2006-06-26 01:36:29 +00:00  
				
					
						
							
							
								 
						
							
								269c232e67 
								
							 
						 
						
							
							
								
								implement #pragma GCC dependency  
							
							... 
							
							
							
							llvm-svn: 38574 
							
						 
						
							2006-06-25 06:23:00 +00:00  
				
					
						
							
							
								 
						
							
								ba6df9122f 
								
							 
						 
						
							
							
								
								Fix Preprocessor/poison_expansion.c  
							
							... 
							
							
							
							llvm-svn: 38573 
							
						 
						
							2006-06-25 05:41:00 +00:00  
				
					
						
							
							
								 
						
							
								55a60954f9 
								
							 
						 
						
							
							
								
								Implement #pragma GCC system_header  
							
							... 
							
							
							
							llvm-svn: 38569 
							
						 
						
							2006-06-25 04:20:34 +00:00  
				
					
						
							
							
								 
						
							
								1786217e0b 
								
							 
						 
						
							
							
								
								Finish implementation of #pragma once.  Implement #pragma GCC poison.  
							
							... 
							
							
							
							llvm-svn: 38568 
							
						 
						
							2006-06-24 22:12:56 +00:00  
				
					
						
							
							
								 
						
							
								b876183219 
								
							 
						 
						
							
							
								
								implement the pragma handling infrastructure.  The only pragma so far is  
							
							... 
							
							
							
							#pragma once, and it is not completely implemented.
llvm-svn: 38566 
							
						 
						
							2006-06-24 21:31:03 +00:00  
				
					
						
							
							
								 
						
							
								e60165fdb5 
								
							 
						 
						
							
							
								
								increase the performance of skipping (#if 0) by optimizing lookup of directive names.  
							
							... 
							
							
							
							llvm-svn: 38564 
							
						 
						
							2006-06-22 06:36:29 +00:00  
				
					
						
							
							
								 
						
							
								40931927af 
								
							 
						 
						
							
							
								
								Speed up directive matching by not using getSpelling(), and not copying std::strings  
							
							... 
							
							
							
							around.
llvm-svn: 38563 
							
						 
						
							2006-06-22 06:14:04 +00:00  
				
					
						
							
							
								 
						
							
								c899718274 
								
							 
						 
						
							
							
								
								Track which headers are system and non-C++-clean-system headers. Use this  
							
							... 
							
							
							
							information to print the 3/4 flags correctly on #line directives emitted
in -E mode.
llvm-svn: 38562 
							
						 
						
							2006-06-22 05:52:16 +00:00  
				
					
						
							
							
								 
						
							
								0c885f5581 
								
							 
						 
						
							
							
								
								Improve #line emission in -E mode to include file entry/exits.  This is  
							
							... 
							
							
							
							still pretty hacky because it doesn't compute the 3/4 markers correctly.
llvm-svn: 38561 
							
						 
						
							2006-06-21 06:50:18 +00:00  
				
					
						
							
							
								 
						
							
								30709b038d 
								
							 
						 
						
							
							
								
								Implement a new type of FileID: FileIDInfo::MacroExpansion.  For tokens that  
							
							... 
							
							
							
							came from a macro expansion, this allows us to keep track of both where the
character data came from and where the logical position of the token is (at
the expansion site).  This implements Preprocessor/indent_macro.c, and
reduces the number of cpp iostream -E diffs vs GCC from 2589 to 2297.
llvm-svn: 38557 
							
						 
						
							2006-06-21 03:01:55 +00:00  
				
					
						
							
							
								 
						
							
								50b497e072 
								
							 
						 
						
							
							
								
								Rename LexerToken::getSourceLocation -> getLocation  
							
							... 
							
							
							
							llvm-svn: 38553 
							
						 
						
							2006-06-18 16:32:35 +00:00  
				
					
						
							
							
								 
						
							
								d01e291332 
								
							 
						 
						
							
							
								
								Make a fundamental change to the way we represent the location of LexerToken's.  
							
							... 
							
							
							
							Now, instead of keeping a pointer to the start of the token in memory, we keep the
start of the token as a SourceLocation node.  This means that each LexerToken knows
the full include stack it was created with, and means that the LexerToken isn't
reliant on a "CurLexer" member to be around (lexer tokens would previously go out of
scope when their lexers were deallocated).
This simplifies several things, and forces good cleanup elsewhere.  Now the
Preprocessor is the one that knows how to dump tokens/macros and is the one that
knows how to get the spelling of a token (it has all the context).
llvm-svn: 38551 
							
						 
						
							2006-06-18 16:22:51 +00:00  
				
					
						
							
							
								 
						
							
								504f2ebb8b 
								
							 
						 
						
							
							
								
								Add missing return  
							
							... 
							
							
							
							llvm-svn: 38547 
							
						 
						
							2006-06-18 07:19:54 +00:00  
				
					
						
							
							
								 
						
							
								7966aafd9b 
								
							 
						 
						
							
							
								
								Simplify an API  
							
							... 
							
							
							
							llvm-svn: 38541 
							
						 
						
							2006-06-18 06:50:36 +00:00  
				
					
						
							
							
								 
						
							
								cb28334ea4 
								
							 
						 
						
							
							
								
								Remove manual conditional error handling code.  
							
							... 
							
							
							
							llvm-svn: 38540 
							
						 
						
							2006-06-18 06:48:37 +00:00  
				
					
						
							
							
								 
						
							
								22eb972f38 
								
							 
						 
						
							
							
								
								Initial checkin of c-language parser  
							
							... 
							
							
							
							llvm-svn: 38539 
							
						 
						
							2006-06-18 05:43:12 +00:00